11.01.2016, 22:36
Код:
if(strcmp(cmdtext, "/salir", true, 8 ) == 0) { if(Juego[playerid] == 0) { SendClientMessage(playerid,COLOR_ROJO,"* Error: No estas en un juego o en un Duelo!"); } if(Juego[playerid] == 1) { foreach(new i: Player) { if(Putos[i] == 1) { format(string, sizeof(string), "{33FF33}* Minigun: Entro %s(%i)[Total: %i]",pName1,playerid, CountEventPlayers(Putos[playerid])-1); SendClientMessage(i, AMARELO, string); } } Putos[playerid] = 0; Juego[playerid] = 0; TogglePlayerControllable(playerid, true); SpawnPlayer(playerid); SetCameraBehindPlayer(playerid); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); GameTextForPlayer(playerid,"~g~saliste del modo~n~~r~DeathMatch~w~/~y~Duelo~w~/Minigame",3000,3); TogglePlayerControllable(playerid, true); } return 1; } if(Juego[playerid] == 1) { GameTextForPlayer(playerid,"~g~Ї C¦mo salir ?~n~~w~usa /salir",4000,3); return 1; } CountEventPlayers(event) { new count = 0; foreach(new i : Player) { if(Putos[i] == event) { count++;//el ++ va agregando un usuario } } return count; }