How to get the player mouse position? - 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: How to get the player mouse position? (
/showthread.php?tid=578816)
How to get the player mouse position? -
Metharon - 22.06.2015
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
Re: How to get the player mouse position? -
SecretBoss - 22.06.2015
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
AW: Re: How to get the player mouse position? -
Kaliber - 22.06.2015
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
Re: AW: Re: How to get the player mouse position? -
SecretBoss - 22.06.2015
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
AW: Re: AW: Re: How to get the player mouse position? -
Kaliber - 22.06.2015
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..
Re: How to get the player mouse position? -
Metharon - 22.06.2015
UP :
- Any ideas ? for example i want an drag'n drop effect.. ?
Re: How to get the player mouse position? -
Jay_ - 22.06.2015
Not possible.
AW: How to get the player mouse position? -
Nero_3D - 23.06.2015
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