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");
}