![]() |
Player x y Serverside
How can I detect "a" player's x y coordinates on serverside, I've tried a few method none to seem to work properly.
|
The X and Y attributes of a player are accessible through the player's object, like on the clientside, i.e. player.x, findPlayer("Skyld").x, etc.
|
right, but I'm talking about if the player just walks by the NPC (it's a Class actually) I tried FindNearestPlayer but had no luck
|
Hmm, I'd do it this way...
HTML Code:
function onCreated() |
setShaoe xD
|
rawr, setShape *edits
thanks ***** x |
And try to prevent it from sending a trigger every 0.05 seconds...
PHP Code:
|
Yes, I do recommend doing that
|
Thanks guys! :D I'll go test this now
EDIT: No, not working still :/ |
triggeraction(this.x+0.5, this.y+0.5, "Detected", ""); ?
I don't know if the trigger is inclusive or exclusive on the border region. |
well, it's a class so triggeraction act different I think, O.o Eh, it's beyond my knowledge :[
|
Triggeractions don't act differently. You just can't use triggerserver or triggerclient inside of classes.
|
so triggeraction ( 0, 0, "serverside", this.name, "Foo"); Would send "Foo" to the serverside of a class? :/ If so, it doesnt for me.
|
Can't communicate server<>client with classes. Only with weapons/gui's.
|
Quote:
|
Quote:
|
Ya, I wanted to create a bomb that exploded and shook the screen, but because the managing of the timer had to be serverside(destroy has to be serverside for it to delete for everyone), and the focus had to be clientside, I never managed to finish it. Sucks, and maybe communication for NPCs will be added soon.
Quote:
|
Quote:
|
Uh, you can use triggeractions and catch the events with a clientside or serverside in classes.
Like: PHP Code:
|
Try something like this
PHP Code:
|
| All times are GMT +2. The time now is 05:28 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.