![]() |
testplayer x.x
I'm making a profile system and when I use rightmousebutton and testplayer, the profile only works when both of the players are on a gmap !pissed!
help? |
How about you give us more details about how you're doing this? Also, please explain how this is a problem.
|
Quote:
|
ok well heres part of the script...and its a problem because when you right click inside a level the profile wont show up :-/
NPC Code:... if i make (pid > -1) it only works on a gmap or when you click yourself...if i make it -2 then anyhwere you click on the screen it shows the last profile you clickd...if i make it 0 it just doesnt work :( |
-1 is what's returned when you get no player.
0 is your own ID. 1 and above is another player. Why is it sending mousex and mousey to the serverside? Why not send #a(pid) ? |
Quote:
is that bad? |
You should just send the account name of the player you found on clientside through the triggeraction. Why do testplayer twice (especially there is the consideration of lag when going from clientside to serverside and vice-versa)?
|
Yes just send #a(pindex) to the server
|
Quote:
|
That made no sense.
Try testplayer(mousex % 65,mousey % 65), but I doubt it'll make a difference. :/ |
Quote:
|
Quote:
NPC Code: See if that detects the players. If it doesn't, you can always loops through the players in the level and check if the mouse coordinates are within the coordinates used by the players. I.E. NPC Code: |
Quote:
Zelph has got it better. And Yen. I'm just wondering. What is the reasoning behind that? |
ok thx
|
There's absolutely no reasoning behind it, but the only reason I could think of for testplayer() not returning anything on a gmap is that testplayer only checks on the individual level, but mousex and mousey are using coordinates on the gmap.
|
Quote:
|
Levels are 64x64 tiles. The 64th tile is valid, so % 65 will begin at 0,0 of your current level.
|
Quote:
|
PHP Code:
It set my chat to 30, not 33. |
Quote:
http://lance.vip.graal.net/screenshots/modproof.png http://lance.vip.graal.net/screenshots/modproof2.png |
No, I warped to a03.. Which was 3 down on the y-axis, not the x-axis..
-Wanders off.- |
Quote:
Either way: http://lance.vip.graal.net/screenshots/modproofb.png NPC Code: |
| All times are GMT +2. The time now is 02:36 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.