View Single Post
  #16  
Old 04-26-2006, 04:59 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Raeiphon
On the subject of triggeractions, couldn't you locate a function above the //#CLIENTSIDE statement and when called, it would run serverside?
You cannot call serverside functions from the clientside. To do such a thing you would have to do like:

PHP Code:
function MyKewlFunction(mykewlparam) {
  echo(
"WEee: " mykewlparam);
}

function 
onActionServerside() {
  if(
params[0] == "mykewlfunction") {
    
MyKewlFunction(params[1]);
  }
}

//#CLIENTSIDE
function onWeaponFired() {
  
triggerserver("gui""MyKewlWeapon""mykewlfunction""OMG CALLED FROM CLIENTSIDE");

__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote