SA-MP Forums Archive
textdraw random amount - 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: textdraw random amount (/showthread.php?tid=82614)



textdraw random amount - happyface - 19.06.2009

how to change text in a textdraw to random number?

i have

pawn Код:
new Text:Test1;
GameModeInIt
pawn Код:
new money1 = random(5000);
new money2 = random(5000);
new money3 = random(5000);

Test1 = TextDrawCreate(200.000000,215.000000,"$ %s~n~$ %s~n~ %s", money1, money2, money3);
i know this is not right but not sure how to make it work

i trying to make those %s be changeable by a random somewhere else, or like, the amount thats already there + random amount

can someone please help me get started


Re: textdraw random amount - yom - 19.06.2009

money1 etc, are integers, not strings. So it's not %s, but %i or %d. Read the manual next time.


Re: textdraw random amount - HuRRiCaNe - 19.06.2009

%s is for names