![]() |
Showimg serverside or serverside to clientside
PHP Code:
If you can't use showimg serverside, then is is possible to use triggerserver/triggeraction to go from serverside to clientside? Similar to: PHP Code:
If this is possible, I could loop through all the players and have the image be displayed to everyone on clientside. Both scripts are on an npc, not a weapon. |
use putnpc2 and this.image
|
what are you trying to do?
|
I don't think mouse events or mouse location are synced serverside (I could be wrong).
Depending on what type of npc it is, you can just catch the mouse event on the clientside and then send a triggeraction to the server. for level npcs, use triggerAction(x, y, ...) for dbnpcs, or npcs placed with putnpc(), use triggerServer("npc", this.name, ...); edit: If you just want the NPC to change its image, use setImg(), but if you want to place an image at the mouse's location, you need to send the mousex and mousey to the serverside. |
There's really no need to show it based on mouse.x or mouse.y either if it's just clicking the NPC directly.
Use this.x and this.y as reference points instead of the mouse. |
Quote:
|
But is it possible to send variables from serverside to clientside?
|
| All times are GMT +2. The time now is 04:01 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.