[AJUDA] /report
#6

Cуdigo Retido de Fуrum SA-MP
Autor do post: dener.

....................

pawn Код:
if(strcmp(cmd, "/report", true) == 0 || strcmp(cmd, "/reportar", true) == 0)
        {
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,0x00A100AA,"Use: /report [ID] [Motivo]");
    return 1;
    }
    giveplayerid = strval(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    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(playerid,0xF60000AA,"/report [ID] [Motivo]");
    return 1;
    }
    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
    format(string,sizeof(string),"REPORT DE : %s (id %d) Reportou %s (id %d). [Motivo: %s]", giveplayer, giveplayerid, sendername, playerid,result);
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerAdmin(i))
    {
    SendClientMessage(i,0xF60000AA,string);
            }
        }
    }
    else
    {
    format(string, sizeof(string), "%d Estб OffLine!", giveplayerid);
    SendClientMessage(playerid, 0xB3B6BCAA, string);
    }
    return 1;
    }
Reply


Messages In This Thread
[AJUDA] /report - by Power_GamerX - 12.02.2011, 03:36
Re: [AJUDA] /report - by Lуs - 12.02.2011, 04:13
Re: [AJUDA] /report - by Power_GamerX - 12.02.2011, 04:24
Re: [AJUDA] /report - by zbt_Daimyo - 12.02.2011, 11:50
Re: [AJUDA] /report - by leandro123456 - 12.02.2011, 11:53
Re: [AJUDA] /report - by Falcon. - 12.02.2011, 11:56
Re: [AJUDA] /report - by Power_GamerX - 12.02.2011, 14:00
Re: [AJUDA] /report - by leandro123456 - 12.02.2011, 14:16
Re: [AJUDA] /report - by Macintosh - 12.02.2011, 14:30
Re: [AJUDA] /report - by Power_GamerX - 12.02.2011, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)