Code Isn't Working the Way It's Supposed to( NEED HELP )
3 replies, posted
-snip problem was solved but I still have another-
Okay, so how would I make
[code]function GM:PlayerSpawn(ply)
if HasCalledFunc == true then
ply:KillSilent()
else
ply:SetTeam(TEAM_HUMAN)
ply:SetModel( table.Random( humanpms ) )
ply:SetupHands()
end
end
[/code],
more specifically the if statement, get called only once? This code just repeatedly kills the player and makes them a spectator... What would I do to make them get killed only once?
Because you checked if it was "true." That's a string, not a boolean
[editline]23rd May 2015[/editline]
Also, localise your variables
Oh, it works fine now. Thanks! Thing is, I need help with one last thing. It repeatedly kills the player. How would I make it get called only once? I can't think of a way...
[QUOTE=A Fghtr Pilot;47787471]Oh, it works fine now. Thanks! Thing is, I need help with one last thing. It repeatedly kills the player. How would I make it get called only once? I can't think of a way...[/QUOTE]
Try using PlayerInitialSpawn instead of PlayerSpawn
Sorry, you need to Log In to post a reply to this thread.