Results 1 to 6 of 6

Thread: zombie detector

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    zombie detector

    hello , i make zombie detector
    why if I am further than the distance detector see me ?


    PHP Code:
    detector()
    {    
        
    self.detector spawn("script_model",self.origin);
        
    self.detector.angles = (self.angles);
        
    self.detector setmodel("xmodel/prop_hydrant");
        
        
    time 45;
        for(;;)
        {
            
    players getentarray("player""classname");
            for(
    0players.sizei++)            
            {    
                
    distance distance(self.detector.originplayers[i].origin);
                if(
    distance 100 && players[i].sessionstate == "playing" && isAlive(players[i]) && players[i].pers["team"] == "axis" && players[i].detector == 0)
                {                    
                    
    players[i].detector 1;
                    
    iprintlnbold("detect : "+players[i].name);
                    
    //players[i] thread detector2();
                
    }
                else
                {
                    
    players[i].detector 0;
                }
            }
            if(
    time<=0)
            {    
                
    players getentarray("player""classname");
                for(
    0players.sizei++)            
                {    
                    
    players[i].detector 0;
                }
                    
    self.detector delete();
                    break;
            }
            
            
    time -= 1;
            
    wait 1;
        } 

    Last edited by malyczolg; 24th October 2013 at 14:29.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •