Results 1 to 10 of 20

Thread: COD2 camper script

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Script is really very boring, but besides, there are a lot of nuances to consider.
    Try something like this
    PHP Code:
    /* start this (self ...();) when play connected on server */
    onPlayerConnect()
    {
        
    self checkLoop();
    }

    checkLoop()
    {
        
    self endon("disconnect");
        
        
    /* cfg */
        
    waitTime .1//maybe .25;
        
        //ALL "CAMP_SECS_*" vars must be multiples of "waitTime" (4 / 0.1 & 6 / 0.1 == true => good)
        
    CAMP_RADIUS 100
        
    CAMP_SECS_WARN 4;
        
    CAMP_SECS_PUNISH 6;
        
        
    self waittill("spawned"); //check your SpawnPlayer in gametype.gsc, need self notify("spawned") or remove this line
        
        
    self.previousPosition self.origin;
        
    self.campTik 0;
        while (
    1)
        {
            if (
    isAlive(self) && (team == "allies" || team == "axis"))
            {
                if (
    distance(self.previousPositionself.origin) > CAMP_RADIUS)
                {
                    
    self.previousPosition self.origin;
                    
    self.campTik 0;
                }
                else
                    
    self.campTik++;
            
                
    campingTime = (self.campTik waitTime);
                if (
    campingTime == CAMP_SECS_WARN)
                    
    self iprintlnBold("stop camp or be kill!");
            
                if (
    campingTime == CAMP_SECS_PUNISH)
                {
                    
    self.campTik 0;
                    
    self iprintlnBold("Camper!");
                    
    self suicide();
                }
            }
            
            
    wait waitTime;
        }

    no tested, maybe some syntax error or dont work
    Last edited by maxdamage99; 16th June 2021 at 05:15.
    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 User Says Thank You to maxdamage99 For This Useful Post:

    girdap (15th June 2021)

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
  •