Well, i'm trying to get this so that when a player gets online he adds his account name to a string and then an NPC checks that string and if the players online don't match the names in the string, a little message saying, "Player <accout namr> has left game."
Currently I Have:
NPC Code:
tokenize2 ,,,#s(this.logged);
for (i=0;i<tokenscount;i++) {
this.found=false;
with (getplayer(#t(i))) this.found=true;
if (this.found==false) {
deletestring this.logged,#t(i);
setstring this.temp,#t(i);
for (p=0;p<allplayerscount;p++){
with (allplayers[p]) {
insertstring client.messages,0,Player #s(this.temp) left the game.;
}
}
}
}
}
if (this.count!=allplayerscount){
for(i=0;i<allplayerscount;i++){
with(allplayers[i]){
this.gotten=false;
for (j=0;j<tokenscount;j++
{
if (strequals(#a,#t(j))) this.gotten=true;
}
if (strlen(#F)>0){
if (this.gotten==false) {
addstring this.logged,#a;
}
} else {setplayerprop #3,headrc.png;}
}
}
}
this.count=allplayerscount;
timeout=.1;
Any help or input would be appreciated.
BTW, this is all serverside database NPCs.