![]() |
Math Help
I am finishing up an inventory script, but I need help for one part which is dropping an item. I want to make it so when the mousescreenx and mousescreeny variable is near the player another function begins. I'm not sure but I remember on an old script with it having something to do with %4 or something im not sure.
Help is appreciated, Thanks. |
Why not use mousex and mousey instead of mousescreenx?
Then you can compare mousex to player.x directly. |
Because it is an inventory z.z. The items are not on the gmap they are on the screen
|
Quote:
|
The mouse is just making a duplicate image on the screen. It's still using the mousescreenx/y var. Also I need to make it so if the mouse is in front of the player the player.dir changes to down, or if its right, the player.dir changes to right. I think thats where I got the %4 from
|
Quote:
PHP Code:
|
I forgot that function existed, lol thanks. Now that thats done I realized another problem z.z.
Well im using a custom ItemLib with item IDs. {1-10 for currency, 200's guns, etc..} PHP Code:
|
Quote:
|
Even without the this.- its the same problem.
|
PHP Code:
|
HTML Code:
//#CLIENTSIDE |
Quote:
It should be mousex-player.x in |-5,5| blah blah blah Even better is PHP Code:
|
Quote:
HTML Code:
mousex in |player.x - 5, player.x + 5| |
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 02:18 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.