03.03.2012, 01:47
pawn Код:
if(strcmp(cmd, "/gmx", true) == 0 || strcmp(cmd, "/restart", true) == 0)
{
if(IsPlayerConnected(playerid))
{
//new string22[128];
if (PlayerInfo[playerid][pAdmin] >=1337)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1337) { return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)"); }
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{ OnPlayerSave(i); }
}
GameTextForPlayer(playerid, "~g~G~y~M~b~X~n~~p~Reiniciando, Aguarde... ", 3000, 3);
GameModeExitFunc();
SaveAccounts();
OnPlayerSave(playerid);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para dar GMX!");
}
}
return true;
}
Topo do GM:
new admtrampando[MAX_PLAYERS];
Na public OnPlayerConnect(playerid)
admtrampando[playerid] = 0;
Espero ter ajudado
