Quote:
Originally posted by TB3
NPC Code:
if(created) {
this.minplayers=5;
this.mode=0;
this.check=0;
}
if(playerenters||playerleaves) {
this.mode=(playerscount>=this.minplayers? 1 : playerscount<this.minplayers? 0 );
if(this.mode!==this.check) {
door();
}
}
function door() {
this.check=this.mode
if(this.mode=1) {//Opening
blah;
}
if(this.mode=0) {//Closing
blah;
}
}
THeres a more complex edit it should work *goez to zleep im tired*
|
I'm sorry but, why does your script question it self?...