Tiny Error
#1

I'm making an FPS list to where it displays all the FPS of all the players. I tested it and everytime i press the command "/fpslist" it displays the players. But once I close it and I type it again, it displays the same thing, twice.
Ex.
1 player typed /fpslist and it says
Player: 46
He closes and types it again and it says:
Player: 46
Player: 46
He then closes and types it a third time and it says:
Player: 46
Player: 46
Player: 46

It just continues to post it over and over.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/fpslist", cmdtext, true, 10) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; ++i)
        {
            if(IsPlayerConnected(i) && !IsPlayerNPC(i))
            {
                format(FPSList, sizeof(FPSList), "%s%s:    %d\n", FPSList, pName(i), FPS2[i]-1);
                ShowPlayerDialog(playerid, DIALOG_FPS_LIST, DIALOG_STYLE_MSGBOX, "Players FPS", FPSList, "Ok", "");
            }
        }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Tiny Error - by ToPhrESH - 18.10.2011, 02:32
Re: Tiny Error - by Ensconce - 18.10.2011, 04:54
Re: Tiny Error - by ToPhrESH - 18.10.2011, 05:37
Re: Tiny Error - by nilanjay - 18.10.2011, 05:42
Re: Tiny Error - by ToPhrESH - 18.10.2011, 05:46
Re: Tiny Error - by nilanjay - 18.10.2011, 05:53
Re: Tiny Error - by ToPhrESH - 18.10.2011, 06:04
Re: Tiny Error - by Ensconce - 18.10.2011, 06:13
Re: Tiny Error - by ToPhrESH - 18.10.2011, 16:23

Forum Jump:


Users browsing this thread: 1 Guest(s)