you'd substring it.
HTML Code:
function onActionServerside() {
if (params[0] == "kick") {
findPlayer(player.chat.substring(5).trim()).setlevel2("level.nw", x, y);
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat.starts(":kick")) {
triggerserver("weapon", this.name, "kick");
}
}
So, first we check if the player is saying ':kick', if yes it will look for the player that is stated after the ':kick' command. Here's an example:
':kick xAndrewx', would kick me.