Problem with my /report command
#1

Hello, I got a problem with my /report command. When i do /report 1 test. It just shows the text when you write /report.

this is the code:

pawn Код:
CMD:report(playerid,params[])
{
    new idx;
    new offset = idx;
    new result[96];
    new string[258];
    new sendername[MAX_PLAYER_NAME];
    new length = strlen(params);
    if(sscanf(params, "ui",playerid,sendername,result))
    return SendClientMessage(playerid, RED, "[LOST:RP] /report [ID] [MESSAGE]");
    if(PlayerInfo[playerid][pRmute] == 1)
    return SendClientMessage(playerid, RED, "[LOST:RP] You are muted from /report, Behave next time");
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        while ((idx < length) && (params[idx] <= ' '))
        {
            idx++;
        }
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
            result[idx - offset] = params[idx];
            idx++;
        }
        result[idx - offset] = EOS;
        if(!strlen(result))
        {
            format(string, sizeof(string), "[LOST:RP] Report from [%d]%s: %s",playerid, sendername, (result));
            aMessage(RED,string,1);
        }
    }
    return 1;
}
Anyone know how to fix this?

Regards, Alex
Reply


Messages In This Thread
Problem with my /report command - by BizzyD - 07.05.2011, 14:34
Re: Problem with my /report command - by Laronic - 07.05.2011, 14:42
Re: Problem with my /report command - by Elka_Blazer - 07.05.2011, 14:44
Re: Problem with my /report command - by BizzyD - 07.05.2011, 14:44

Forum Jump:


Users browsing this thread: 1 Guest(s)