I think i covered most of your edits. I was confused by two of them:
1) check in all lowercase. I'm not really sure what the point of this was. Could you elaborate a little more on its purpose please?
2) the filter. I understand that it is a quicker way of checking than mine, but i just couldnt get it to work.
aside from those, I corrected the other parts and added the community name and clientside shared.chat.
PHP Code:
// Scripted by Phil Smith
function onActionServerSide(search, temp.action){
//for loop to find all players and their partial nicks
temp.foundPlayers.destroy();
for(temp.pl : allplayers){
if(temp.pl.account.starts(search)|| temp.pl.communityName.starts(search) || temp.pl.nick.starts(search)){
if (temp.pl.level!=NULL){ //if player is not on rc
temp.foundPlayers.add(temp.pl); //logs the player into the array
}
}
}
if (temp.foundPlayers.size()==1){
onPlayerFound(temp.action, temp.foundPlayers[0]);
}
if(temp.foundPlayers.size()<1){
player.chat="No Players Found!";
}
if(temp.foundPlayers.size()>1){
triggerclient("weapon",this.name,"NoneFound",temp.foundPlayers);
}
}
function onPlayerFound(temp.func, temp.pl){
if (temp.func=="summon"){
temp.pl.setlevel2(player.level.name,player.x,player.y);
}
else if(temp.func=="warp"){
setlevel2(temp.pl.level,temp.pl.x,temp.pl.y);
}
}
//#CLIENTSIDE
function onActionClientSide(temp.action, temp.chatarray){
if(temp.action=="NoneFound"){
shared.chat(temp.chatarray.size() SPC "Players Were Found!:");
sleep(2);
for(temp.i==0;temp.i<temp.chatarray.size();temp.i++){
shared.chat(temp.chatarray[temp.i]);
sleep(4);
}
}
}
function onPlayerChats(){
if(player.chat.starts("/warp")){
triggerserver("weapon",this.name,player.chat.substring(6),"warp");
}
if(player.chat.starts("/summon")){
triggerserver("weapon",this.name,player.chat.substring(8),"summon");
}
}