Dialog style - 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)
+--- Thread: Dialog style (
/showthread.php?tid=640400)
Dialog style -
TonyII - 02.09.2017
Hey, I just stumbled upon something interesting regarding dialogs. My question is how is it done?
They managed to make one of the dialog's button play a timer, I personally thought dialogs were static :/ There are no signs of the dialog actually being hid and shown again when counting down. Is it actually a textdraw or am I missing something? I also like the 2 straight lines in there, it just makes me wonder how it's done so smoothly
Re: Dialog style -
Kane - 02.09.2017
I'm guessing it's a textdraw.
It's too big to be a dialog.
Re: Dialog style -
TonyII - 02.09.2017
Yea that was one of my guesses as well but when you hover that button it's exactly like when you hover a actual dialog button, it slightly goes above and the borders get red
Re: Dialog style -
Kane - 02.09.2017
They could just be using the same colors as SA:MPs default with SelectTextdraw's hovercolor.
Re: Dialog style -
Meller - 02.09.2017
That's just a normal dialog.. what are you on.. they're showing the dialog each second. I used to do this as well.
Re: Dialog style -
TonyII - 02.09.2017
Does it have a smooth output when you do it each second? I haven't tried it myself yet, just curious
Re: Dialog style -
Kane - 02.09.2017
I was actually wrong. Must of been thinking of something else.
It is a dialog:
https://i.gyazo.com/8fc1a1d238903102...1495d58231.mp4
It's only noticeable if you press F6 to open the chat box. It'll disappear and reappear.
Re: Dialog style -
kAn3 - 02.09.2017
It is a dialog. The button there showing a timer is nothing but a formatted string
format(str, sizeof str, "%d", Timer);
Where the integer "Timer" lowers in a callback called every second.
Re: Dialog style -
BadJih - 02.09.2017
it's textdraw
Re: Dialog style -
Vince - 02.09.2017
Quote:
Originally Posted by TonyII
Does it have a smooth output when you do it each second? I haven't tried it myself yet, just curious
|
If it is the exact same dialog with the exact same text then you don't notice any difference. I actually ran into this a few days ago because it bugged one of my systems. I had a dialog show up when a player picked up a pickup but as long as the player was standing in the pickup the dialog would get triggered again every two seconds. I didn't even notice this until I added a sound for triggering the dialog. It kept going "beep, beep, beep" which is how I ultimately knew that the dialog kept triggering.