SA-MP Forums Archive
Dini - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dini (/showthread.php?tid=262311)



Dini - Wesley221 - 17.06.2011

Hey guys,

Im currencly working on a bank FS, and i got some problems with depositting money into a .ini.

It's all working with dialogs, when you go to the deposit dialog, and type 500 as example, it changes the amount in the ini to 53.

pawn Код:
dini_IntSet(file, "Cash amount", dini_Int(file, "Cash amount") + inputtext[0]); // Getting the amount of cash that is already in the file, and then add's the inputtext what you want to deposit
And yes, i also got the amount of money that i'm trying to deposit on the bank

Tell me if you need any more details


Re: Dini - Wesley221 - 17.06.2011

Bump, but also a question.
How can i see if inputtext of a dialog contains letters/numbers?


Re: Dini - Wesley221 - 18.06.2011

Bump


Re: Dini - Mike Garber - 18.06.2011

use strval(inputtext);


Re: Dini - Wesley221 - 18.06.2011

Can you explain it a little bit, and about what are you talking? if inputtext contains numbers, or the other question?


Re: Dini - DRIFT_HUNTER - 18.06.2011

Like Mike Garber said:
pawn Код:
dini_IntSet(file, "Cash amount", dini_Int(file, "Cash amount") + strval(inputtext));



Re: Dini - Wesley221 - 18.06.2011

Thanks! Got that working now
Never used strval, so i had no clue how to use it

Now my last question:
How can i prevent using letters in a inputbox, so just numbers are allowed?