PHP Code:
findplayer("khortez").addweapon(this.name);
function onActionServerSide(){
if(params[0] == "warp"){
temp.pl = player;
temp.warped = findplayerbycommunityname(params[1]);
}
if(temp.warped != NULL){
temp.pl = temp.pl.setlevel2(temp.warped.level, temp.warped.x, temp.warped.y);
}
else {
temp.pl.chat = "Can't find"SPC params[1];
}
}
//#CLIENTSIDE
function onPlayerChats(){
if(player.chat.starts("/warp")){
triggerserver("gui", this.name, "warp", player.chat.substring(5));
}
}
I've been trying to get this to work, and for some reason it's not. can anyone tell me what i'm doing wrong?
any additional helpful comments on how to make my scripts better is appreciated. thanks