/report system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /report system (
/showthread.php?tid=609055)
/report system -
jimis - 08.06.2016
hi guys, anyone knows how i can create mine /report sytem? i know how to use ini save system , i am saving players stats with it, but how i can save whatevr players reports?
Thanks
Re: /report system -
BornHuman - 08.06.2016
https://sampforum.blast.hk/showthread.php?tid=356867
If that's not what you're looking for utilize the search function on these forums.
Re: /report system -
Nin9r - 08.06.2016
You can make a system of reports without ini or sql. For example, make a variable like
PlayerInfo[playerid][pReported] = 0; and PlayerInfo[playerid][pReportMessage]; ( pReported, pReportMessage[64];
/report command:
Код HTML:
CMD:report(playerid, params[])
{
new message[128],admins=0;
if(sscanf(params, "s[128]", message)) return SCM(playerid, COLOR_GREY, SYNTAX_MESSAGE"/report [text]");
{
foreach(Player, i)
{
if(PlayerData[i][pAdmin] >= 1)
{
admins++;
}
}
if(admins == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: There are no admins online.");
new string128[256];
format(string128, sizeof(string128), "Your report message was sent to admins.");
SendClientMessage(playerid, 0xFFFFFFFF, string128);
format(string128, sizeof(string128), "Report from %s [%d]: %s.",PlayerInfo[playerid][pNormalName],playerid, message);
submitToAdmins(string128,COLOR_LIGHTRED);
PlayerInfo[playerid][pReported] = 1;
format(PlayerInfo[playerid][pReportMessage], 256,"%s", string128);
}
return 1;
}
and
Код HTML:
CMD:reports(playerid, params[])
{
new count = 0;
if(PlayerInfo[playerid][pAdmin] >= 1)
{
foreach(Player, i)
{
if(PlayerInfo[i][pReported] == 1)
{
SCM(playerid, COLOR_LIGHTRED, PlayerInfo[i][pReportMessage]);
count++;
}
}
format(szMessage,256, "Total reports: %d", count);
SCM(playerid, -1, szMessage);
}
return 1;
}