![]() |
MouseOver?
Chris (aka cbk1994) helped me on a custom nickname script, I was just wondering how do I go about making it hide, untill a players mouse is over their character then it will show?
PHP Code:
|
Add a parameter to drawNicknames which is the player object of the nickname you want to show, then inside of the timeout, test the players in the level and check if the mousex and y are in the player's x and y, if it is, then drawNicknames(pl). Then inside of drawNicknames(pl), inside of the for loop, add a check for the player object, like if (temp.p == pl).
Inside of drawNicknames you could be removing extra images that aren't used by adding hideimg(200, 300); at the top of the function or so. |
You don't even need a loop for that.
PHP Code:
|
I don't believe findnearestplayer works on the client-side.
temp.p refers to a player object so you can just use.. NPC Code: The in operator has a couple different uses: NPC Code: or it can be used as a shortcut instead of doing.. NPC Code: |
It should, at least, it's listed.
|
Quote:
I'm a freshman @ scripting. |
See if you can figure it out from here:
PHP Code:
|
I tried rebuilding something better:
PHP Code:
|
Your issue with that is, that it will run once (when you login or update the script) and won't work after, you need to have a loop like so:
PHP Code:
|
So ya, this works perfectly fine...
PHP Code:
|
All times are GMT +2. The time now is 04:19 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.