[HELP] Textdraw for PayDay
#1

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...

EXAMPLEdisplayed in the right bottom corner)

Payment

Old Ballance: %d
Interest: %d
New Ballance: %d
Reply
#2

Anyone?
Reply
#3

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.
Reply
#4

Thanks for the tip. Tho' Zamaroths FS gives an error when running.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)