/stats error
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/buycar", true) == 0)
    {
        ShowPlayerDialog(playerid, 13, DIALOG_STYLE_LIST, "Car Dealership", "Huntley\nAdmiral\nBurrito\nStratum\nSadler\nUranus", "Buy", "Close");
        return 1;
    }
    if(strcmp(cmdtext, "/stats", true) == 0)
    {
        new string[144];
        format(string, sizeof(string), "Money: [$%d]", PlayerInfo[playerid][pMoney])
        SendClientMessage(playerid, COLOR_GREEN, string);
        return 1;
    }
    return 1;
}
You should use a command processor, strcmp commands are slow because it has to do a lot of checking. Command processors call the function directly.
Reply


Messages In This Thread
/stats error - by boy - 11.10.2014, 00:34
Re: /stats error - by SickAttack - 11.10.2014, 00:42
Re: /stats error - by boy - 11.10.2014, 00:53
Re: /stats error - by The__ - 11.10.2014, 01:11
Re: /stats error - by austin070 - 11.10.2014, 01:11
Re: /stats error - by boy - 11.10.2014, 01:37
Re: /stats error - by Threshold - 11.10.2014, 02:13

Forum Jump:


Users browsing this thread: 1 Guest(s)