Quote:
Originally Posted by sssssssssss
tried a typical triggeraction, still nothing.
|
The way you type the actionname is case-sensitive with regards to catching the event, so if you do:
PHP Code:
triggerAction(this.x+1, this.y+1, "Midi", "");
Then the way to catch the event HAS to be like this:
PHP Code:
function onActionMidi() {
}
If you use "midi" or any other variant, then you will have to adjust the onActionActionname() part accordingly (i.e onActionmidi() instead--case-senstive).
As for your problem, I created a quick example of how to do it:
PHP Code:
function onCreated() {
setshape(1, 32, 32);
}
function onActionTriggerServer(){
echo("You triggered to the serverside!");
triggerAction(this.x+1, this.y+1, "TriggerClient", "");
}
//#CLIENTSIDE
function onCreated() {
setshape(1, 32, 32);
triggerAction(this.x+1, this.y+1, "TriggerServer", "");
}
function onActionTriggerClient() {
this.chat = "You triggered to the clientside!";
}
You can pass parameters by removing the part where I used empty quotations and replacing it with the parameters.