[HELP] Textdraw for PayDay - 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: [HELP] Textdraw for PayDay (
/showthread.php?tid=100596)
[HELP] Textdraw for PayDay -
viKKmaN - 05.10.2009
Hy. I made my own payday script and it displays Ballance, Interest and New Ballance in the chatbox.
My question is. How can i change it to display those infos in a textdraw based on multiple lines? Cauze from when i've tryed i can't make one textdraw with multiple lines...
EXAMPLE

displayed in the right bottom corner)
Payment
Old Ballance: %d
Interest: %d
New Ballance: %d
Re: [HELP] Textdraw for PayDay -
viKKmaN - 05.10.2009
Anyone?
Re: [HELP] Textdraw for PayDay -
member - 05.10.2009
Well, first u need to create a textdraw according to the style/colour/font/size etc you want.
Here's a very good in-game textdraw creator by Zamaroht.
http://forum.sa-mp.com/index.php?topic=29132.0
Then, once you have created ur textdraw and put it in your gamemode/filterscript, you need to use
format to format the string (as you did with your SendClientMessage when you display the player's balance etc.) and also you will need to use TextDrawSetString:
https://sampwiki.blast.hk/wiki/TextDrawSetString
Here's an Example:
pawn Код:
new string[128];
format(string,sizeof(string),"Old Balance: $%d~n~Interest: $%d~n~New Balance: $%d",OldBalance, Interest, NewBalance);
TextDrawSetString(TEXTDRAW_NAME, string);
TextDrawShowForPlayer(playerid, TEXTDRAW_NAME);
This may be useful for changing colours etc:
https://sampwiki.blast.hk/wiki/GameTextStyle
Note: ~n~ means new line (included in the example format).
Good Luck.
Re: [HELP] Textdraw for PayDay -
viKKmaN - 05.10.2009
Thanks for the tip. Tho' Zamaroths FS gives an error when running.