public idmatch(playerid,string[]) { new id=-1; if(strlen(string)==0) { SendClientMessage(playerid,servermsg,"Input an ID/name!"); return -1; } else { new matches=0; if(isnum(string)==1) { new nid=strval(string); if(IsPlayerConnected(nid)) { return nid; } } for(new n=0;n1) { new output[256]; format(output,sizeof(output),"There were %d matches found for \"%s\" - aborting.",matches,string); SendClientMessage(playerid,servermsg,output); return -1; } else if(matches==0) { new output[256]; format(output,sizeof(output),"There were no matches found for \"%s\" - aborting.",string); SendClientMessage(playerid,servermsg,output); return -1; } } return id; }