29.10.2012, 18:58
You can make a command to stop reports by doing something like this:
Using a bool we would have this some where in the script:
And then here we would toggle it:
Then inside the report command:
Using a bool we would have this some where in the script:
pawn Код:
new bool:AllowReports = true;
pawn Код:
COMMAND:togglereports(playerid, params[])
{
// Put your admin check here
if(AllowReports == true)
{
AllowReports = false;
SendClientMessageToAll(COLOR_RED, "Reports are now disabled");
return 1;
}
AllowReports = true;
SendClientMessageToAll(COLOR_RED, "Reports are now enabled");
return 1;
}
pawn Код:
COMMAND:report(playerid, params[])
{
// Put this check at the start
if(AllowReports == false)
{
return SendClientMessage(playerid, COLOR_RED, "Reports are currently disabled.");
}
// Rest of the report stuff here