ItsMods

Full Version: Player In Server Count Code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need the scripting code for thow many players are in the server and how many are in each teams any one could either make one or if theres already one tell me what it is?

(if it doesnt exist my idea was something like on player connected add 1 to X and that way I can get the total number of people in the server)
(07-03-2011, 22:46)Scripts18 Wrote: [ -> ]I need the scripting code for thow many players are in the server and how many are in each teams any one could either make one or if theres already one tell me what it is?

(if it doesnt exist my idea was something like on player connected add 1 to X and that way I can get the total number of people in the server)

Euhm i have this in Aliens vs Marines. Good luck on your hunt

Can you help me a bit? Im beginign in this?

Code:
level.players.size //total players currently in the server

CountAllies()
{
allies = 0;

for(i = 0; o < level.players.size; i++)
if(level.players[i].team == "allies")
allies++;

return allies;
}

CountAxis()
{
axis = 0;

for(i = 0; o < level.players.size; i++)
if(level.players[i].team == "axis")
axis++;

return axis;
}
Just don't use the PTK player-count code, its buggy as hell lol.
Thx alot nukem
theres a problem with the code when I use it it says that the o is not uni......
copy and paste code from nuketown to get player count...
kkkkkkkkkk