28.02.2014, 18:04
Hi people! I'm trying to create a function (called by a timer) which "scan" if some user with X variable is connected and if it is make an action and if it is not, make another action. I think I haven't meant properly... I did something like this but it didn't work, can you help me?? Sorry for my bad English :S
Код:
new PlayerCount; function ActivarAntiAFK() { for (new i = 0; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { #if defined ADMINSONLNE if(PlayerInfo[i][AdminMC] == 0)) { SendRconCommand("loadfs antiafk"); } else if(PlayerInfo[i][AdminMC] !=0) { SendRconCommand("unloadfs antiafk"); } #endif PlayerCount++; } } }