[HELP] Regarding my /report command.
#1

Hello basically, I'm having problems with my /report command. When I type /report in game it will show up, but it changes, instead of adding it to a list. Here is the command:

pawn Код:
CMD:report(playerid, params[])
{
    if(!isnull(params))
    {
        new List = 1;
        if(ReportList == 0)
        {
            List = 2;
            ReportList = 1;
        }
        if(ReportList == 1)
        {
            List = 3;
            ReportList = 2;
        }
        if(ReportList == 2)
        {
            List = 4;
            ReportList = 3;
        }
        if(ReportList == 3)
        {
            List = 1;
            ReportList = 0;
        }
        new String[128];
        format(String, sizeof(String), "~r~%s(%i)~n~~w~%s", ReturnPlayerName(playerid), playerid, params);
        TextDrawSetString(Reports[List], String);
        TextDrawShowForPlayer(playerid, Reports[0]);
        TextDrawShowForPlayer(playerid, Reports[List]);
        ReportList = List;
    }
    return 1;
}
Also, I only show myself the textdraw for testing purposes.


Thanks. Any information needed can be provided.
Reply
#2

****** there is a reason. As Reports[0] is the title. And Reports[1] onward is for reports. It all works, just doesn't add to a list. It just changes the list.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)