03.03.2014, 17:36
PHP код:
new AdminColor[MAX_PLAYERS];
new TempColor[MAX_PLAYERS];
if(!strcmp("/amode", cmd, true)) if(Logged[playerid] == 1)
{
if(IsPlayerAdmin(playerid)) return 0;
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "( ! ) USAGE: /amode 0 or 1");
if (!strcmp("1", tmp, true)) if(Logged[playerid] == 1)
{
if(IsPlayerAdmin(playerid)) return 0;
AdminColor[playerid] = 1;
TempColor[playerid] = GetPlayerColor(playerid);
SendClientMessage(playerid, COLOR_RED, "( ! ) You are now on Admin mode");
SetPlayerColor(playerid, COLOR_RED);
return 1;
}
if(!strcmp("0",tmp,true)) if(Logged[playerid] == 1)
{
if(IsPlayerAdmin(playerid))return 0;
SetPlayerColor(playerid,TempColor[playerid]);
AdminColor[playerid] = 0;
SendClientMessage(playerid, COLOR_RED, "( ! ) You are no longer on Admin mode");
}
return 1;
}

