Posts: 683
Threads: 104
Joined: Jul 2012
Reputation:
0
Hello people, I really need the command /report [id] [reason]. Don't need to be too fancy or nothing like that just very very simple. So simple that could work like the /pm command. When a PL type /report 25 cheater, all Admins will receive a message like this "ID 25 | cheater". Please help, Thanks.
Posts: 320
Threads: 16
Joined: Feb 2012
Using ZCMD, enjoy
pawn Код:
#include <foreach>
CMD:report(playerid, params[])
{
new string[128], id;
if(sscanf(params, "us[128]", id, params))
{
foreach(Player, i)
{
if(IsPlayerAdmin(i))
{
format(string, sizeof(string), "Report from (%d): %s", id, params");
SendClientMessage(i, -1, string);
SendClientMessage(playerid, -1, "You report has been sent to the administrators");
}
}
}
else return SendClientMessage(playerid, -1, "Usage: /report [id] [text]");
return 1;
}
Posts: 298
Threads: 28
Joined: Sep 2011
Reputation:
0
ZCDM is slower actually now there is new one you should try using new things
Posts: 320
Threads: 16
Joined: Feb 2012
Quote:
Originally Posted by Lauder
Not working. When I type /report it says Unknown Command! Help! Someone ANSWER
|
Have you added the zcmd include?
Quote:
Originally Posted by aslan890
Код:
CMD:reports(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new reportdialog[1000], itemid = 0;
for(new i = 0; i < MAX_REPORTS; i++)
{
if(Reports[i][BeingUsed] == 1 && itemid < 40)
{
ListItemReportId[playerid][itemid] = i;
itemid++;
format(reportdialog, sizeof(reportdialog), "%s%s(ID:%i) | RID:%i | Report: %s", reportdialog, GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, (Reports[i][Report]), Reports[i][TimeToExpire]);
format(reportdialog, sizeof(reportdialog), "%s\n", reportdialog);
}
}
CancelReport[playerid] = itemid;
format(reportdialog, sizeof(reportdialog), "%s\n", reportdialog);
format(reportdialog, sizeof(reportdialog), "%sCancel Reports", reportdialog);
ShowPlayerDialog(playerid, REPORTSMENU, DIALOG_STYLE_LIST, "Reports", reportdialog, "Accept", "Trash");
}
return 1;
}
|
Copy pasting isn't nice mate.