Another /report bug..
#3

Quote:
Originally Posted by Loot
Посмотреть сообщение
strcmp is so old school.. You should consider working with zcmd.
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]) 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;
}
idk whether that code works but u made an error in that, like typo
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;
}
u just did
pawn Код:
PlayerInfo[playerid][pReportMuted]
Which Should Be
PlayerInfo[playerid][pReportMuted] == 1
This forum requires that you wait 240 seconds between posts. Please try again in 12 seconds.
Reply


Messages In This Thread
Another /report bug.. - by whando - 10.11.2013, 10:47
Re: Another /report bug.. - by Loot - 10.11.2013, 11:58
Re: Another /report bug.. - by newbie scripter - 10.11.2013, 13:11

Forum Jump:


Users browsing this thread: 1 Guest(s)