Quote:
Originally Posted by sssssssssss
That would have been easier, wish I would have thought of i, got it to go server flag though. I guess its the first thing that came to mind, then, just didn't think any further on the matter. xD
all well.
Thanks for everyones help on the subject!
|
The problem with your previous script was that you were looping on the serverside through all players in the level and trying to call the triggerAction() that way back to clientside when you didn't need to do so. Simply call the triggerAction() without any loops (the same way you did on the clientside part), and then do the loop on the clientside to have the track play for all the players in the level.
It would be smarter to use a seperate function for this because you would end up doing the loop on the onPlayerEnters() event which is not necessary. Instead of making the script call onPlayerEnters() after you trigger back to the clientside from the serverside, have it call a different function that will do the loop there. You're going to have to play around with the loop, though, since you would have to change around how you're doing it on the serverside to get the play command called on everyone in the level.
Quote:
Originally Posted by Switch
In a weapon/level:
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
if (!(player.account in {"sssssssssss","Decus_Arilias"}))
return;
if (!(player.chat.tokenize()[0] == "playmidi"))
return;
setAni("playmidi",player.chat.tokenize()[1];
}
|
Your example is a little off since it would only set the animation for the player using the command.