• Global variables that change on disconnect?
    6 replies, posted
Hey there, I'm attempting to make a variable that changes on disconnect. Basically what it is - is: [lua] function GM:PlayerDisconnect(pl) if pl:Team() == TEAMNAME_HERE then TEAM_AMOUNT = TEAM_AMOUNT - 1 end end [/lua] I've attempted to do this but no luck...
This is for a gamemode, correct?
Yessir!
Why not just track the number of players per team in a Think function?
Never thought of that... :v:
Or just team.NumPlayers( team_index )?
:wtc: just use [b][url=http://wiki.garrysmod.com/?title=Team.GetPlayers]Team.GetPlayers [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] :ninja:
Sorry, you need to Log In to post a reply to this thread.