Results 1 to 6 of 6

Thread: zombie detector

  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.

  2. #2
    Private
    Join Date
    Sep 2013
    Posts
    13
    Thanks
    1
    Thanked 2 Times in 2 Posts
    What is zombie detector

  3. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    if detector see you , hunters see appears over your head icon

  4. The Following User Says Thank You to malyczolg For This Useful Post:

    default (24th October 2013)

  5. #4
    Private
    Join Date
    Sep 2013
    Posts
    13
    Thanks
    1
    Thanked 2 Times in 2 Posts
    but this bad

  6. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    I assume you walk away from the original location of the detector spawn.

    This means your detector.origin will remain where it was spawned, and the distance between THAT point and the zom will be less than 100.

  7. #6
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    work . delete players[i].detector

Posting Permissions

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