10.11.2013, 13:11
Quote:
strcmp is so old school.. You should consider working with zcmd.
pawn Код:
|
pawn Код:
CMD:report(playerid, params[])
{
new iPlayer, reason[124];
if(sscanf(params, "us[128]", iPlayer, reason)) return SendClientMessage(playerid, -1 ,"/report [id/nick] [reason]");
if(iPlayer == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1 ,"Player not connected"); // "if player not connected"
if(PlayerInfo[playerid][pReportMuted] == 1) return SendClientMessage(playerid, COLOR_RED, "You are muted from sending any /reports!");
JustReported[playerid] = 1;
SetTimerEx("ReportReset", 20000, false, "i", playerid);
format(string, sizeof(string), "%s reporting %s: %s", RemoveUnderScore(playerid), RPN(iPlayer), (result));
ABroadCast(COLOR_RED, string, 1);
SendClientMessage(playerid, COLOR_YELLOW, "Your report was succesfully sent.");
Reported[playerid] = 1;
return 1;
}
pawn Код:
PlayerInfo[playerid][pReportMuted]
Which Should Be
PlayerInfo[playerid][pReportMuted] == 1