Results 1 to 10 of 20

Thread: COD2 camper script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    PHP Code:
    self.flagAttacher 
    this flag saw player has flag or no, add it in checkLoop()
    PHP Code:
        /* ... */
        
    while (1)
        {
            if (
    isAlive(self) && !self.flagAttached && (team == "allies" || team == "axis"))
            {

        
    /* ... */ 
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  2. The Following 2 Users Say Thank You to maxdamage99 For This Useful Post:

    girdap (25th June 2021),kung foo man (24th June 2021)

  3. #2
    Private
    Join Date
    Apr 2021
    Posts
    16
    Thanks
    13
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by maxdamage99 View Post
    PHP Code:
    self.flagAttacher 
    this flag saw player has flag or no, add it in checkLoop()
    PHP Code:
        /* ... */
        
    while (1)
        {
            if (
    isAlive(self) && !self.flagAttached && (team == "allies" || team == "axis"))
            {

        
    /* ... */ 
    Thanks. i am getting error :



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

    kung foo man (24th June 2021)

  5. #3
    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

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

    girdap (24th June 2021)

  7. #4
    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
  •