12.09.2016, 11:42
Код:
stock CountEventPlayersTDM(event, team) { new count = 0; foreach(new i : Player) { if(gPlayerGamemode[i] == event) { if(GetPlayerTeam(i) == team) // anything ? { count++; } } } return count; } //for example this code dosen't work CountEventPlayersTDM(MODE_TDM, TEAM_ONE);
------------------------------------------------------------------------------------------------
i am using another function which returns a value.
Код:
stock CountEventPlayers(event) { new count = 0; foreach(new i : Player) { if(gPlayerGamemode[i] == event)//works perfectly { count++;//add one to the count } } return count; }