How to get the player mouse position?
#1

I want to let the players to choose where the clock textdraw to be ..


How can i do something like that ? .. to get mouse position
Reply
#2

Quote:
Originally Posted by Metharon
Посмотреть сообщение
I want to let the players to choose where the clock textdraw to be ..


How can i do something like that ? .. to get mouse position
I think its impossible, cuz I have never seen something like this in any gamemode
Reply
#3

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
I think its impossible, cuz I have never seen something like this in any gamemode
It is possible.

You must create blocks of textdraws and make them clickable.

Then you check on which block he clicked...and this is the area where the clock is
Reply
#4

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
It is possible.

You must create blocks of textdraws and make them clickable.

Then you check on which block he clicked...and this is the area where the clock is
That sounds right but it will take so long to make, but its impossible to take mouse position
Reply
#5

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
That sounds right but it will take so long to make, but its impossible to take mouse position
...the block you make is not 1x1px...(but you could...then you would get the mouse position )

And its not...he can give 4 boxes...and the guy can choose where to locate the clock..
Reply
#6

UP :

- Any ideas ? for example i want an drag'n drop effect.. ?
Reply
#7

Not possible.
Reply
#8

Drag and drop is not possible but to get the mouse position should be possible with SelectTextDraw (something like Kaliber suggested), so you can move it without drag like in the very old programms

1. Select the textdraw you want to move with SelectTextDraw
2. If a textdraw got selected in OnPlayerClickTextDraw create / show the textdraw grid for the mouse position
3. If clicked at new position, destroy old textdraw and create it again at the new position
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)