• Not working
    6 replies, posted
I was watching a youtube series that pretty much walked you through coding LUA for a gamemode. When it was time to test nothing happened >.< Here is the main code, [lua] AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( 'shared.lua' ) resource.AddFile("models/weapons/w_fists_t.mdl") resource.AddFile("models/weapons/w_fists_t.vvd") resource.AddFile("models/weapons/w_fists_t.phy") resource.AddFile("models/weapons/w_fists_t.sw.vtx") resource.AddFile("models/weapons/w_fists_t.dx90.vtx") resource.AddFile("models/weapons/w_fists_t.dx80.vtx") resource.AddFile("models/weapons/v_punch.mdl") resource.AddFile("models/weapons/v_punch.vvd") resource.AddFile("models/weapons/v_punch.sw.vtx") resource.AddFile("models/weapons/v_punch.dx90.vtx") resource.AddFile("models/weapons/v_punch.dx80.vtx") resource.AddFile("sound/weapons/fists/hl2_slash1.wav") resource.AddFile("sound/weapons/fists/hl2_slash2.wav") // Serverside only stuff goes here /*--------------------------------------------------------- Name: gamemode:PlayerLoadout( ) Desc: Give the player the default spawning weapons/ammo ---------------------------------------------------------*/ function GM:PlayerSpawn( ply ) self.BaseClass:PlayerSpawn( ply ) ply:SetGravity( 0.90 ) ply:SetMaxHealth( 125, true ) ply:SetWalkSpeed( 325 ) ply:SetRunSpeed( 525 ) end function GM:PlayerLoadout( ply ) ply:StripWeapons() ply:Give( "weapon_crowbar" ) ply:Give( "weapon_pistol" ) ply:Give( "hl2_combo_fists" ) end function GM:PlayerInitialSpawn() self.BaseClass:PlayerInitialSpawn(ply) if ply:IsAdmin() then ply:PrintMessage( MUD_PRINTTALK, "BoomBoomHeadShot333: Wazzup admin!") end end [/lua] I have all my weapons also I don't get any of the weapons here. So the StripWeapons() isnt working and the ply:Give() doesn't work. Also, how would you add a character as an admin?
Lua tags, also "MUD_PRINTTALK", its suppose to be "HUD_PRINTTALK".
[QUOTE=Dragge;24119362]Lua tags, also "MUD_PRINTTALK", its suppose to be "HUD_PRINTTALK".[/QUOTE] What do you mean by Lua tags?
Before your block of code, put [noparse][lua][/noparse] and then after your block of code, put [noparse][/lua][/noparse]. This allows us to view it more clearly.
Its still hot showing anything?
Yes we can see it fine if your not using Internet explorer.
Was this part of the gamemode I fixed for you?
Sorry, you need to Log In to post a reply to this thread.