SA-MP Forums Archive
Little help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little help (/showthread.php?tid=408447)



Little help - Scott Zulkifli - 18.01.2013

pawn Код:
if (inputtext > GetPlayerCash(playerid) || inputtext < 1)



Re: Little help - basse - 18.01.2013

may i ask what you need help with?


Re: Little help - Scott Zulkifli - 18.01.2013

LOL?

Quote:

array must be indexed (variable "inputtext")




Re: Little help - B-Matt - 18.01.2013

pawn Код:
if (strval(inputtext) > GetPlayerCash(playerid) || strval(inputtext)< 1)
Try this.


Re: Little help - Scott Zulkifli - 18.01.2013

and
pawn Код:
GivePlayerCash(playerid,-inputtext);
Quote:

argument type mismatch (argument 2)




Re: Little help - Threshold - 18.01.2013

pawn Код:
GivePlayerCash(playerid,-strval(inputtext));
strval returns the value of a string or integer etc.
https://sampwiki.blast.hk/wiki/strval


Re: Little help - Norrin - 18.01.2013

pawn Код:
if (strval(inputtext) > GetPlayerCash(playerid) || strval(inputtext)< 1)
{
    GivePlayerCash(playerid,-strval(inputtext));
    // Do the stuff you want here.
    return 1;
}
+Rep if helped.