[Pedido]Comando /a
#2

PHP код:
if(strcmp(cmd"/admin"true) == || strcmp(cmd"/a"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
          new 
nome[24];
          
GetPlayerName(playeridnomesizeof nome);
          if(
PlayerInfo[playerid][pAdmin] >= || strfind(nomeADMPLAYERtrue) == || strfind(nomeADMPLAYER2true) == 0)
          {
            
GetPlayerName(playeridsendernamesizeof(sendername));
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[64];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridCOLOR_RED"USO: (/a)dmin [admin chat]");
                return 
1;
            }
            if(
strfind(nomeADMPLAYERtrue) == || strfind(nomeADMPLAYER2true) == 0)
            {
             
format(stringsizeof(string), "|ADMIN| %s[%i]: %s"PlayerInfo[playerid][pAdmin],ADMMASTERresult);
             
SendAdminMessage(GOLDENROD1,string);
             
printf("|ADMIN-CHAT|%s: %s"sendernameresult);
            }
            else
            {
             
format(stringsizeof(string), "|ADMIN-CHAT| %s[%i]: %s"PlayerInfo[playerid][pAdmin],sendernameresult);
             
SendAdminMessage(GOLDENROD1,string);
             
printf("|ADMIN-CHAT| %s: %s"sendernameresult);
            }
          }
        }
        return 
1;
    } 
Reply


Messages In This Thread
[Pedido]Comando /a - by randyrko - 03.07.2011, 20:10
Re: [Pedido]Comando /a - by Ricop522 - 03.07.2011, 20:28
Re: [Pedido]Comando /a - by TheGarfield - 03.07.2011, 20:29
Re: [Pedido]Comando /a - by Shadoww5 - 03.07.2011, 20:36
Re: [Pedido]Comando /a - by randyrko - 03.07.2011, 20:58
Re: [Pedido]Comando /a - by Ricop522 - 03.07.2011, 21:17
Re: [Pedido]Comando /a - by randyrko - 03.07.2011, 21:22
Re: [Pedido]Comando /a - by crush_ - 03.07.2011, 23:26

Forum Jump:


Users browsing this thread: 1 Guest(s)