View Single Post
  #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