Get Position Mouse Cursor?
#1

Hi ! I want to detect when the mouse cursor hovering an textdraw. Its possible?
https://sampwiki.blast.hk/wiki/SelectTextDraw

I dont need a code for c/c but i want to explain me thanks !
Reply
#2

I don't think that would be possible.
Reply
#3

Note: TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable.

But that thing is not possible, only to click the textdraw..
Reply
#4

This is impossible in Pawn.

It is possible with plugins but this only gets the server's mouse position. This also doesn't work on linux.
Reply
#5

Okay tanks !
Reply
#6

you have to setup a server-client plugin and "give" the .dll to all clients so you can get mouse cursor pos
Reply
#7

You can, I guess, Y Less had done something like this, using camera vectors, but it's difficult maths and inacccurate.
Reply
#8

Hmmm.. creating many squares of TextDraw's (almost transparent box) when you store to create positive, and you will call the square called onplayerClicktextdraw that coordinates!
Reply
#9

Quote:
Originally Posted by Scriptery
Посмотреть сообщение
Hmmm.. creating many squares of TextDraw's (almost transparent box) when you store to create positive, and you will call the square called onplayerClicktextdraw that coordinates!
Getting the clicked position is no problem but he wanted the hover position
Reply
#10

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Getting the clicked position is no problem but he wanted the hover position
Exactly.
However, if there was a textdraw color detection feature, it will become possible using his method. Something like TextDrawGetColor as the textdraw color would change on hover.
Anyway I can't expect Kalcor adding a feature like this one so I guess this would be forever impossible on samp.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)