/buygold command
#1

So i have problem with this /buygold command
PHP код:
YCMD:kupizlato(playeridparams[], help)
{
    
#pragma unused help
    
if(IsPlayerInRangeOfPoint(playerid1.01696.5371,-1183.6985,23.8899))
    {
        new 
string[128], ammountcash ammount 300;
        if(
GetPlayerMoney(playerid) < cash)
        {
            
SCM(playerid, -1"[ES:RPG] "CRVENA"Nemate dovoljno novca!");
            return 
1;
        }
        else
        {
            if(
sscanf(params"u"ammount))
            {
                
SCM(playerid,-1,"ES:RPG Pomoc | "SPLAVA"/kupizlato [Kolicina]");
                
SCM(playerid,-1,"ES:RPG Pomoc | "SPLAVA"Cijena grama je 300");
                return 
1;
            }
            else
            {
                
PlayerInfo[playerid][pZlato] += ammount;
                
GivePlayerMoney(playerid, - cash);
                
format(stringsizeof(string), ""SPLAVA"Kupili ste "ZUTA"%d g zlata za "ZELENA"%d$"ammountcash);
                
SCM(playerid, -1string);
                return 
1;
            }
        }
    }
    else
    {
        
SCM(playerid, -1"[ES:RPG] "CRVENA"Niste na mjestu kupovine zlata!");
        return 
1;
    }

No warns no erros but it says that i bought 65535g of gold for 0$. Why is that happening??
And it gives me 65535 gold WTF!
Reply


Messages In This Thread
/buygold command - by Micko123 - 14.06.2016, 11:51
Re: /buygold command - by Konstantinos - 14.06.2016, 12:10
Re: /buygold command - by Stinged - 14.06.2016, 12:14
Re: /buygold command - by saffierr - 14.06.2016, 12:44
Re: /buygold command - by Micko123 - 14.06.2016, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)