[AJUDA] Como criar /report [id] e /relatorio
#3

PHP код:

    
if(strcmp(cmd"/reportar"true) == || strcmp(cmd"/re"true) == 0)
    {
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp)) return SendClientMessage(playerid0xFFFFFFAA"USE: /reportar [id] [texto]");
        
id strval(tmp);
        new 
reportado[MAX_PLAYER_NAME], reportador[MAX_PLAYER_NAME], motivo[128];
        
GetPlayerName(idreportadosizeof(reportado));
        
GetPlayerName(playeridreportadorsizeof(reportador));
        if(!
IsPlayerConnected(id)) return SendClientMessage(playerid0xFFFFFFAA"Error: Jogador off.");
        if(
id == INVALID_PLAYER_ID) return SendClientMessage(playerid0xFFFFFFAA"ERROR: Jogador invбlido.");
        
motivo strtok(cmdtextidx);
        if(!
strlen(motivo)) return SendClientMessage(playerid0xFFFFFFAA"USE: /reportar id texto");
        new 
string[128];
        
format(stringsizeof(string), "Jogador %s[%i] reportou %s[%i] motivo %s"reportadorplayeridreportadoidmotivo);
        
SendClientMessage(i0xFFFFFFAA"[js] Relatуrio enviado.");
        for(new 
0MAX_PLAYERS; ++i)
        {
            if(
IsPlayerAdmin(i))
            {
                
SendClientMessage(i0xFFFFFFAAstring);
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
[AJUDA] Como criar /report [id] e /relatorio - by tivin - 08.05.2011, 21:01
Re: [AJUDA] Como criar /report [id] e /relatorio - by Macintosh - 08.05.2011, 21:08
Re: [AJUDA] Como criar /report [id] e /relatorio - by Ricop522 - 08.05.2011, 21:14
Re: [AJUDA] Como criar /report [id] e /relatorio - by The Knight - 08.05.2011, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)