Results 1 to 10 of 20

Thread: COD2 camper script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Instead of while (1) you can check while (isDefined(self)) or use endon at top of method
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    girdap (24th June 2021)

  3. #2
    Private
    Join Date
    Apr 2021
    Posts
    16
    Thanks
    13
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by kung foo man View Post
    Instead of while (1) you can check while (isDefined(self)) or use endon at top of method
    After doing this:

    PHP Code:
            if (isAlive(self) && !self.flagAttached && self.pers["team"] == "allies" || self.pers["team"] == "axis"
    should i do like this?


    my code is resistant to this if you have properly organized code (default, standard from .iwd) and use "thread"

    try set self.flagAttached = false by default

    p.s: and try fix some by self, if you write all time when has error - you not learning

    use .iwd, this is how i do it.



    I have no clue how this is done.

    I'm trying to solve the errors myself, I'm testing. If I can't solve it, I write it here, not every mistake.

    for example
    PHP Code:
    (team == "allies" || team == "axis")) 
    fixed the error like this
    PHP Code:
    self.pers["team"] == "allies" || self.pers["team"] == "axis"
    ////

    this is the last edit. I couldn't fix the flag bearer.

    PHP Code:
    self.previousPosition self.origin;
        
    self.campTik 0;
        while (
    1)
        {
            if (
    isAlive(self) && !self.flagAttached && self.pers["team"] == "allies" || self.pers["team"] == "axis")
            {
                if (
    distance(self.previousPositionself.origin) > level.campradius)
                {
                    
    self.previousPosition self.origin;
                    
    self.campTik 0;
                }
                else
                    
    self.campTik++;
            
                
    campingTime = (self.campTik waitTime);
                if (
    campingTime == level.campsecswarn)
                    
    self iprintlnBold("stop camp or be kill!");
            
                if (
    campingTime == level.campsecspunish)
                {
                    
    self.campTik 0;
                    
    self iprintlnBold("Camper!");
                    
    self suicide();
                }
            }
            
            
    wait waitTime;
        }

    this is the last one.

Tags for this Thread

Posting Permissions

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