Something like this is a good way to check
PHP Code:
if (created) timeout=0.1;
if (timeout) {
for (a=0;a<allplayerscount;a++) {
with (allplayers[a]) {
if (strlen(#F)>0)
if(!strcontains(#s(this.tempplayers),#a)) addstring this.tempplayers,#a;
}
}
logon();
logoff();
setstring this.tempplayers,;
timeout=1;
}
function logon() {
tokenize #s(this.tempplayers);
for (a=0;a<tokenscount;a++) {
if (!strcontains(#s(this.players),#t(a))){
addstring this.players,#t(a);
}
}
}
function logoff() {
tokenize #s(this.players);
for (a=0;a<tokenscount;a++) {
if (!strcontains(#s(this.tempplayers),#t(a))) {
removestring this.players,#t(a);
}
}
}