12.02.2011, 11:56
Cуdigo Retido de Fуrum SA-MP
Autor do post: dener.
....................
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;
}