/report request
#1

Hi is there any report system working please someone reply and post here because cant find it on search, thanks
Reply
#2

Might help you.
http://forum.sa-mp.com/index.php?top...1641#msg911641

Tip: The "Search" Function is great!
Reply
#3

ok but where do I put it on pawno, do I put it under OnPlayerCommandText?
Reply
#4

No, that command shouldn't be in any callback or function, it's dcmd-command as you can see. You will also need dcmd define for that.
Reply
#5

add this to under any commands like /invite or /b or /o or w/e

Код:
//-------------------------[Report]---------------------------------------------
if(strcmp(cmd, "/report", true) == 0)
{
new rpt[256];
rpt = strtok(cmdtext, idx);

if(!strlen(rpt))
{
SendClientMessage(playerid, COLOR_WHITE, "* USAGE: /report [playerid] [reason]");
return 1;
}
giveplayerid = strval(rpt);

strmid(tmp, cmdtext, 8+strlen(tmp), strlen(cmdtext));

if(!strlen(rpt))
{
SendClientMessage(playerid, COLOR_WHITE, "* USAGE: /report [playerid] [reason]");
return 1;
}

if (IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "*** %s (id: %d) reports player %s (id: %d) Reason: %s ***", sendername, playerid, giveplayer, giveplayerid, tmp);
ABroadCast(COLOR_YELLOW, string,1);

format(string, sizeof(string), "* Your report on player %s (id: %d) was sent to currently online admins*", giveplayer, giveplayerid);
SendClientMessage(playerid, COLOR_GREEN, string);
} else {
format(string, sizeof(string), "* ID %d is not active a player.", giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
}

return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)