.:`=-~rANdOm~`-=:.
Tech Lounge => Programming => Topic started by: Krasher on May 12, 2010, 11:53:11 AM
-
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):
function GM:PlayerLoadout( ply )
ply:StripWeapons()
ply:Give( "weapon_zm_carry" )
end
help!
-
I think stripweapons() isn't in caps
function GM:PlayerLoadout( pl )
ply:stripweapons()
ply:Give( "weapon_crowbar" )
ply:Give( "weapon_pistol" )
end
I'm probably wrong but just try it
that's what I did when i was first trying out lua
-
I think stripweapons() isn't in caps
function GM:PlayerLoadout( pl )
ply:stripweapons()
ply:Give( "weapon_crowbar" )
ply:Give( "weapon_pistol" )
end
I'm probably wrong but just try it
that's what I did when i was first trying out lua
1.) Your function targets are off (pl to ply)
2.) StripWeapons is a function. It will be in caps.
HELP MEEE
-
1.) Your function targets are off (pl to ply)
2.) StripWeapons is a function. It will be in caps.
HELP MEEE
pl and ply do the same thing
-
pl and ply do the same thing
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 :/
-
I dont see anything wrong. Mabe just me lol.
-
Steal TTT dropping shiz.
-
Sorry I can't help.
I only know a bit of lua.
Maybe use Frank's suggestion.
-
What exactly is happening when you execute the function?
Are you running this serverside?
Maybe try with a weapon you know will work (if it's that issue)
Put a print command in the function to see if it's running ( if that's the issue )
-
What exactly is happening when you execute the function?
Are you running this serverside?
Maybe try with a weapon you know will work (if it's that issue)
Put a print command in the function to see if it's running ( if that's the issue )
mmk will do.
Current Code: (init.lua) so little because I had to restart and I am trying to fix this before I go on to anything else.
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua' )
/*------------------------------------------
KRASHER RULES :D, remember to say thanks
------------------------------------------*/
function GM:PlayerSpawn( ply )
self.BaseClass:PlayerSpawn( ply )
ply:SetGravity( 0, 90 )
ply:SetMaxHealth( 125, true )
ply:SetMaxSpeed( 345, 545 )
end
function GM:PlayerLoadout( ply )
ply:StripWeapons()
ply:Give("weapon_zm_carry")
end
function GM:PlayerInitialSpawn( ply )
self.BaseClass:PlayerInitialSpawn( ply )
ply:PrintMessage( HUD_PRINTTALK, "Hello, you are playing", GM.Name, "v", GM.Version)
end
-
READ MY COMMENT?
STEAL TTT
-
READ MY COMMENT?
STEAL TTT
-.-, that is not what this is about Frank.
-
Oh k sry.
Me be nub. Keel me or asplode me pl0z
-
Oh k sry.
Me be nub. Keel me or asplode me pl0z
/me Rocketed Frank(23.74.55.12 (http://1227.com):2750 - STEAM_0_5128347) @ 21:28 - 13.05.2010
-
lol nice avatar magik
-
lol so thats what magik was up to. RAPEIN lil girls. lol
-
It's OMG faic
-
Yo if you still need help with your problem im sure i can fix it for you.....i made a couple of gamemods that drop your weapons when you die and im sure i can rig it so yours will work just pm me if you still need some help with it and ill look into it more