Textdraw Problem
#1

Hey!

I'm having a problem with Textdraw being shown without it being called in any way.

So basically, I made some global textdraws, wrote their code under "OnGameModeInit" and I got timer set to show them 5 seconds after players register/login's but they already show as soon as register/login screen appears.. Any fixes ?
Reply
#2

Lets see that timer and function which the timer calls.
Reply
#3

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Lets see that timer and function which the timer calls.
https://pastebin.com/GnsCYKRp
Reply
#4

Okay so the problem is likely inconsistent client load times or you set that timer at the wrong time (wrong callback?). You should look for a better time to activate this timer that gives better consistency.
Reply
#5

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Okay so the problem is likely inconsistent client load times or you set that timer at the wrong time (wrong callback?). You should look for a better time to activate this timer that gives better consistency.
Makes no sense to me tho, I'm calling timer after player registers/login, gonna try to call it some other time I guess
Reply
#6

Oh I know why duh! You need to save your timer to a variable and make sure that you kill the timer! Someone is disconnecting quick but that timer still runs for the next player connecting.
Reply
#7

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Oh I know why duh! You need to save your timer to a variable and make sure that you kill the timer! Someone is disconnecting quick but that timer still runs for the next player connecting.
Oh ye...

Totally forgot I made global timer.. Thanks
Reply
#8

Actually, there is no need for the timer imho.

Just show the textdraw after the register/login message (if you have one), or if you don't, after setting all variables and similar.

Then hide it after they spawn or make them hide by pressing MMB or any key you wish.
Reply
#9

Quote:
Originally Posted by SymonClash
Посмотреть сообщение
Actually, there is no need for the timer imho.

Just show the textdraw after the register/login message (if you have one), or if you don't, after setting all variables and similar.

Then hide it after they spawn or make them hide by pressing MMB or any key you wish.
I made timer for a reason, since I use interpolatecamera for cinematic, and I want textdraws to show after camera stops moving.. and I couldnt find option like "OnCameraStopMoving" so I used timer.
Reply
#10

Quote:
Originally Posted by NoteND
Посмотреть сообщение
I made timer for a reason, since I use interpolatecamera for cinematic, and I want textdraws to show after camera stops moving.. and I couldnt find option like "OnCameraStopMoving" so I used timer.
Well you never said about InterpolateCameraPos...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)