Tech Lounge > Programming

Help! ( "lua coders only" )

(1/4) > >>

Krasher:
I have just recently began making another gamemode, Prop Arena, and I cannot seem to get the Gamemode to make the player drop his weapons and get what I want him to have.

Current Code (Without TAB spacing):

--- Code: ---function GM:PlayerLoadout( ply )
ply:StripWeapons()
ply:Give( "weapon_zm_carry" )
end
--- End code ---

help!

Majoras mask:
I think stripweapons() isn't in caps


--- Code: ---function GM:PlayerLoadout( pl )

        ply:stripweapons()
        ply:Give( "weapon_crowbar" )
        ply:Give( "weapon_pistol" )
end
--- End code ---

I'm probably wrong but just try it


that's what I did when i was first trying out lua

Krasher:

--- Quote from: SMasters9106 on May 12, 2010, 12:03:20 PM ---I think stripweapons() isn't in caps


--- Quote ---function GM:PlayerLoadout( pl )

        ply:stripweapons()
        ply:Give( "weapon_crowbar" )
        ply:Give( "weapon_pistol" )
end
--- End quote ---

I'm probably wrong but just try it


that's what I did when i was first trying out lua

--- End quote ---
1.) Your function targets are off (pl to ply)
2.) StripWeapons is a function. It will be in caps.

HELP MEEE

Majoras mask:

--- Quote from: Kräsh∑r on May 12, 2010, 12:05:28 PM ---1.) Your function targets are off (pl to ply)
2.) StripWeapons is a function. It will be in caps.

HELP MEEE

--- End quote ---

pl and ply do the same thing

Krasher:

--- Quote from: SMasters9106 on May 12, 2010, 12:06:09 PM ---pl and ply do the same thing

--- End quote ---
Nope, when you set your self.BaseClass.PlayerInititialize( ply ), it knows that ply is your player.

EDIT:// Unless self.BaseClass.PlayerInitialize( pl, ply )

Hurp Durp, think of solutions xD...

Will try the no caps thing, prob won't work sadly :/

Navigation

[0] Message Index

[#] Next page

Go to full version