Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-26-2011, 04:45 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Triggering serverside, then clientside

So, I have been trying to learn how to trigger to clientside from the serverside and I read cbk's post on it. Ive been messing with this script for a little while and I have no idea why this is not triggering on the clientside. I have put checks in on the serverside and clientside and both check out fine except for other players (besides me) on the clientside:

PHP Code:
function onActionServerSide() {
  if (
params[0] == "show") {
    for (
temp.plallplayers) {
      if (
pl.level.name == nil)
        continue;
      
pl.triggerclient("gui"this.name"disp");
    }
  }
  if (
params[0] == "sendpm") {
    
findplayer("pig132").sendPM(player.account " clicked!");
  }
}
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat "/test") {
    
triggerserver("gui"this.name"show");
  }
}

function 
onActionClientSide() {
  if (
params[0] == "disp") {
    
CreateMenu();
  }

Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.