29.11.2015, 13:40
Код:
else if(strcmp(cmdtext, "/kickall", true) == 0) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be rcon admin use /rcon login {pass}"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && (i != playerid))} { PlayerPlaySound(i,1057,0.0,0.0,0.0); Kick(i); } new string[128]; format(string,sizeof(string),"[ Administrator \"%s\" has Kicked all players. ]"); return 1; }
PS: even if u send it at last the player wont recieve it cause you will be send the message AFTER kicking
2. it kicks you cause you are looping through all players and NOT EXCLUDING yourself