Admin mode
#2

PHP код:
new AdminColor[MAX_PLAYERS];
new 
TempColor[MAX_PLAYERS];
if(!
strcmp("/amode"cmdtrue)) if(Logged[playerid] == 1)
    {
    if(
IsPlayerAdmin(playerid)) return 0;
    
tmp strtok(cmdtextidx);
    if (!
strlen(tmp)) return SendClientMessage(playeridCOLOR_WHITE"( ! ) USAGE: /amode 0 or 1");
    if (!
strcmp("1"tmptrue)) if(Logged[playerid] == 1)
    {
    if(
IsPlayerAdmin(playerid)) return 0;
             
AdminColor[playerid] = 1;
    
TempColor[playerid] = GetPlayerColor(playerid);
    
SendClientMessage(playeridCOLOR_RED"( ! ) You are now on Admin mode");
     
SetPlayerColor(playeridCOLOR_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(playeridCOLOR_RED"( ! ) You are no longer on Admin mode");
              }
           return 
1;
            } 
+REP me if I helped you
Reply


Messages In This Thread
Admin mode - by Ananisiki - 03.03.2014, 17:26
Re: Admin mode - by KhaledElkhourashi - 03.03.2014, 17:36
Re: Admin mode - by Ananisiki - 03.03.2014, 17:41
Re: Admin mode - by Ananisiki - 03.03.2014, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)