View Single Post
  #1  
Old 12-06-2010, 03:57 AM
ZeroG ZeroG is offline
Developer
Join Date: Oct 2010
Posts: 12
ZeroG is on a distinguished road
Showimg serverside or serverside to clientside

PHP Code:
function onActionLeftMouse(){
   
showimg(196"green_rupee.png"mouse.x-0.5mouse.y-0.5);

I'm trying to get the image to appear serverside for everyone if a player clicks it. I'm not sure if showimg is clientside only or what.

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:
function onCreated(){
  
this.attr[2] = this.name;
}
function 
onActionServerSide(){
  
this.destroy();
}
//#CLIENTSIDE
function onPlayerTouchsMe(){
  
triggerserver("npc"this.attr[2], NULL);

But instead of clientside to serverside, it's serverside to clientside.
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.
Reply With Quote