Greetings! I made a /report function. It does show "USAGE: /report [ID] [reason]" when writing /report, but it does not show "You have reported %s to the administration for ''%s", nor does it show when logging in as admin;
pawn Код:
CMD:report(playerid, params[])
{
new id, reason[128], string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
if(sscanf(params,"uz", id, reason)) return SendClientMessage(playerid, COLOR_IRAQ, "USAGE: {ffffff}/report [ID] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED,"ERROR: {ffffff}invalid player id.");
else
{
GetPlayerName(id, name,sizeof(name));
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
{
if(GetPVarInt(playerid, "Level") < 1) return 1;
format(string, sizeof(string), "[Player ID: %d] %s has reported %s for: %s", playerid, sendername, name, reason);
ABroadCast(COLOR_RED,string,1);
format(string, sizeof(string), "Use /trashre [ID] or /on [ID]");
ABroadCast(COLOR_IRAQ,string,1);
}
format(string, sizeof(string), "You have reported %s to the administration for ''%s''.", name, reason);
SendClientMessage(playerid,COLOR_AQUA,string);
SendClientMessage(playerid, COLOR_AQUA, "Please be patient and wait for a reply.");
PlayerNeedsHelp[playerid] = 1;
}
return 1;
}
pawn Код:
if(sscanf(params,"uz", id, reason)) return SendClientMessage(playerid, COLOR_IRAQ, "USAGE: {ffffff}/report [ID] [reason]");
pawn Код:
if(sscanf(params,"us[128]", id, reason)) return SendClientMessage(playerid, COLOR_IRAQ, "USAGE: {ffffff}/report [ID] [reason]");