open.mp forum
[Pawn] Advanced Textdraws - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Advanced Textdraws (/showthread.php?tid=1492)



Advanced Textdraws - PanGemius - 2021-01-04

Hi guys,



I would like to do some better stuff with textdraws other than just showing a text. But in my TD editor I did not manage to do things like this:

https://www.youtube.com/watch?v=C9Pjjo5KQos



How can they be done and what would you recommend? Ty.


RE: Advanced Textdraws - Jarnokai - 2021-01-04

The textdraw editor is merely for creating the visual part of the textdraws - that is, if you are creating a phone, for example, you would create various box-shaped textdraws in order to make the body, screen and other features of the phone. Then you would type in normal text draws for the buttons and letters. Finally you create a base for the menu. After the visual part is done, the final and ultimately most important part is start scripting and bring your textdraws to life!

All of the menu, audio, navigation and other functions shown in the video you linked are done through PAWN scripting. The TD editor is only used to create the visuals.


RE: Advanced Textdraws - PanGemius - 2021-01-04

Alright and how does the bringind the textdraws to the life work? It is literally like detecting keys and hiding/showing new textdraws? Is not that too much lines of code? Because from the point that I understand how it works, it needs to be sooo much work.


RE: Advanced Textdraws - PanGemius - 2021-01-04

One more question just to add. If I want to do for example casino features, how to include like Singleplayer pictures of for example that coin winning machine, where you have to match 3 results in order to win? For example 3 golden bricks?



Thanks!


RE: Advanced Textdraws - Jarnokai - 2021-01-08

(2021-01-04, 03:48 PM)PanGemius Wrote: Alright and how does the bringind the textdraws to the life work? It is literally like detecting keys and hiding/showing new textdraws? Is not that too much lines of code? Because from the point that I understand how it works, it needs to be sooo much work.



Yes, key detection and hiding/showing and manipulating textdraws. It needs a lot of work and sadly I believe there is no open-source pre-made systrem for it.