Not a bad start, But why not do something like this?
PHP Code:
function onActionServerSide(){
if(params[0] == "Mute"){
temp.muted = GetPlayer(params[1]);
//handle other stuff here
}
}
function GetPlayer(plyr){
for(temp.pl : allplayers){
if(pl.nick.starts(plyr)){
temp.plyr = pl;
}
}
}return plyr;
And just send the players chat of someone's name in the trigger.
Then all you have to do is like /mute Bbo
And if you're name was BboyEatsBacon it would select you.
So for the clientside what I mean is do something like this.
PHP Code:
temp.items = player.chat.tokenize();
temp.plyr = items[1];
triggerserver("weapon", this.name, "Mute", plyr);