ItsMods

Full Version: Kill Campers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
nvm.. ive got the broken code fixed, and now i have a working one.
Yeah the code is completely wrong. May recode it when I'm at home.
[quote='d0h!' pid='8606' dateline='1297941005']
PHP Code:
self thread killCampers(); 

PHP Code:
killCampers()
{
        
self.wontmove false;
        while(
1)
        {
                
oldorigin self.origin;
                
wait 1;
                
neworigin self.origin;
                if(
distance(oldoriginneworigin) < 20 && self.sessionstate == "playing")
                {
                        if (
self.wontmove) {
                                
self suicide();
                                
self iPrintln(self.name "^2was killed for camping!");
                                
self.wontmove false;
                        } else {
                                
self.wontmove true;
                                
self iPrintlnBold("^0You will die in 10 seconds unless you stop camping!");
                                
wait 10;
                        }
                }
                else
                {
                        
self.wontmove false;
                }
        }


Something like this.
Pages: 1 2