SA-MP Forums Archive
SelectTextDraw - Fade cursor. HELP! - 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: SelectTextDraw - Fade cursor. HELP! (/showthread.php?tid=639333)



SelectTextDraw - Fade cursor. HELP! - Zamek - 15.08.2017

Sory for my bad english. I use translate . (polish)

Hey! I have a problem with clickable textdraws. The problem is quite embarrassing because when I call the SelectTextDraw function after the form is welded, the cursor disappears automatically. The same situation happens when you press the TAB (player list), then the cursor flashes like crazy. The number of created textdraws is not exceeded. I have 490 global textdraws and 90 for the player. I do not know what the problem is, if it will be needed, will send the code.

Please help!


Re: SelectTextDraw - Fade cursor. HELP! - JasonRiggs - 15.08.2017

I can't totally understand, All what I can say for you, Is to make a clickable textdraw, Create it first, and use OnPlayerClickTextDraw (for global textdraws) and OnPlayerClickPlayerTextDraw (for player textdraws) to have the response..


Re: SelectTextDraw - Fade cursor. HELP! - Zamek - 16.08.2017

I know it's hard to understand, but the simplest way to do this is to act as if OnPlayerUpdate was called CancelSelectTextDraw and CancelSelectObject because the same situation happens when you want to call SelectObject. The best part is that I restored the gamemods 7 days ago, but that was not the case, the same thing and I am sure that at that moment it certainly worked. I have no idea what's going on, I suspect plugins or includies, but I have not changed anything for a week. I also have crachdetecta, which does not show anything in the logs.

It just works as if every 10 milliseconds of me pressed ESC and called CancelSelectTextDraw / Object.


Re: SelectTextDraw - Fade cursor. HELP! - Ballu Miaa - 16.08.2017

OnPlayerUpdate is the problem then. OnPlayerUpdate is called every time your player moves. Therefore move it to some other callback or function. Like OnPlayerSpawn or when a command is input.


Re: SelectTextDraw - Fade cursor. HELP! - Zamek - 16.08.2017

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
OnPlayerUpdate is the problem then. OnPlayerUpdate is called every time your player moves. Therefore move it to some other callback or function. Like OnPlayerSpawn or when a command is input.
You misunderstood me, I gave only an example on what principle it works. I do not have the CancelSelectTextdraw / Object function called in OnPlayerUpdate. I gave an example of how it works, which works as if every 10 milliseconds was called the CancelSelectTextDraw / Object function.


Re: SelectTextDraw - Fade cursor. HELP! - Zamek - 16.08.2017

Problem repair