26.11.2011, 12:12
Can these commands be changed that the admin also provides a reason
Example: Admin %s has trashed your report, Reason: %s
Example: Admin %s has trashed your report, Reason: %s
pawn Код:
if(strcmp(cmd, "/denyreport", true) == 0 || strcmp(cmd, "/drp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /(d)eny®e(p)ort [PlayerID/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "AdmCmd: %s has marked %s's report as: Invalid.", sendername, giveplayer);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "%s has marked your report as invalid, it will not be viewed.", sendername);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that Command !");
return 1;
}
}
return 1;
}