ConvertPrice bug ?
#6

You're creating an array which isn't needed here.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/givemoney", cmdtext, true, 10) == 0)
    {
        new string[100];
        GivePlayerMoney(playerid, 1000);
        format(string,sizeof(string),"[Info] You get %d !",ConvertPrice(1000, 1));
        SendClientMessage(playerid, -1, string);
        return 1;
    }
    return 0;
}
If don't want to remove, then just use single variable.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/givemoney", cmdtext, true, 10) == 0)
    {
        new cash = 1000, string[100];
        GivePlayerMoney(playerid, cash);
        format(string,sizeof(string),"[Info] You get %d !",ConvertPrice(cash, 1));
        SendClientMessage(playerid, -1, string);
        return 1;
    }
    return 0;
}
But I prefer to use #define here.
Reply


Messages In This Thread
ConvertPrice bug ? - by Sanady - 18.10.2014, 12:24
Re: ConvertPrice bug ? - by zaibaslr2 - 18.10.2014, 12:29
Re: ConvertPrice bug ? - by [LvZ]Free - 18.10.2014, 12:29
Re: ConvertPrice bug ? - by cessil - 18.10.2014, 12:31
Re: ConvertPrice bug ? - by Neil. - 18.10.2014, 12:33
Re: ConvertPrice bug ? - by Yera96 - 18.10.2014, 12:47

Forum Jump:


Users browsing this thread: 1 Guest(s)