[AJUDA]Comando /report - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA]Comando /report (
/showthread.php?tid=199019)
[AJUDA]Comando /report -
ecl - 14.12.2010
Olб galera to sofrendo pra acha esse comando de reportar.
Й o seguinte eu queria o script do comando /report ou /reportar [id] [motivo] mas nao to conseguindo acha na net queria que enviasse para o player logado na RCon somente para o player que estivesse logado na RCon para
ver o REPORT entenderam?
Se puderem dar uma forca ae seria de grande ajuda.
Re: [AJUDA]Comando /report -
DeNeR - 14.12.2010
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;
}
Re: [AJUDA]Comando /report -
ecl - 14.12.2010
Quote:
Originally Posted by 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; }
|
Certo amigo obrigado, obrigado mesmo.