Results 1 to 5 of 5

Thread: superjump for many times

  1. #1
    Private
    Join Date
    Aug 2013
    Posts
    95
    Thanks
    13
    Thanked 4 Times in 3 Posts

    superjump for many times

    hello everybody

    i wanna do a shop in my zombie mod and i want do a superjump.
    script superjump:
    PHP Code:
    self iprintlnbold("^7Press ^3[^7JUMP ^3+ ^7SHOOT^3]");
        
    self endon("disconnect");
        
    self endon("end_do_jump");
        while(
    1)
            {
                if(!
    self isOnGround() && self attackButtonPressed())
                {
                    
    level.boostjump 10000;
                    
    self.health+=level.boostjump;
                    
    eInflictor self;
                    
    eAttacker self;
                    
    iDamage level.boostjump;
                    
    iDFlags 0;
                    
    sMeansOfDeath "MOD_PROJECTILE";
                    
    sWeapon "panzershreck_mp";
                    
    vPoint = ( self.origin+(0,0,-1) );
                    
    vDir = (0,0,1);
                    
    sHitLoc "none";
                    
    psOffsetTime 0;
                    
    self finishPlayerDamageeInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLocpsOffsetTime );
                    for(;;)
                    {
                        if(
    self isOnGround() || !isAlive(self))
                        {
                            
    self.sj 1;
                            break;
                        }
                        
    wait 0.1;
                    }
                    break;
                }
                else
                {
                    
    wait 0.05;
                }      
            } 

    but i want to do many superjumps on 50 sec
    somebody know how make?
    i thought do a thing like that:
    PHP Code:
    self iprintlnbold("^7Press ^3[^7JUMP ^3+ ^7SHOOT^3]");
        
    self endon("disconnect");
        
    self endon("end_do_jump");
        
        
    self.jump_time newClientHudElem(self);
        
    self.jump_time.610;
        
    self.jump_time.225;
        
    self.jump_time.alignX "right";
        
    self.jump_time.fontScale 1.2;
        
    self.jump_time.label = &"^7SuperJump Time:^1 &&1";
        
        while(
    1)
            {
                if(!
    self isOnGround() && self attackButtonPressed())
                {
                    
    level.boostjump 10000;
                    
    self.health+=level.boostjump;
                    
    eInflictor self;
                    
    eAttacker self;
                    
    iDamage level.boostjump;
                    
    iDFlags 0;
                    
    sMeansOfDeath "MOD_PROJECTILE";
                    
    sWeapon "panzershreck_mp";
                    
    vPoint = ( self.origin+(0,0,-1) );
                    
    vDir = (0,0,1);
                    
    sHitLoc "none";
                    
    psOffsetTime 0;
                    
    self finishPlayerDamageeInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLocpsOffsetTime );
                    
    time 50;
                    for(;;)
                    {
                        
    self.jump_time setvalue(time);
            
                        if(
    time<=&& self isOnGround() || !isAlive(self))
                        {
                            
    self.sj 1;
                            
    self.jump_time destroy();
                            break;
                        }

                        
    wait 1;
                        
    time -= 1;
                    }
                    break;
                    }
                    else
                    {
                    
    wait 0.05;
                }
          }

    but the time start when i jump and i cant do superjump many times..
    somebody can help me? pls
    xfire: ordi37zk

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Lol.

    Double-check your loops, it is messed up like crazy.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Private
    Join Date
    Aug 2013
    Posts
    95
    Thanks
    13
    Thanked 4 Times in 3 Posts
    you know how create that?

  4. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    ofc i do
    PHP Code:
    //in your shop menu:
        
    if(self.money 9000)
        {
            if(
    isdefined(self.got_boostjump) && self.got_boostjump)
            {
                
    self iprintln("You already have this enabled");
                return;
            }
            
    self.money -= 9000;
            
    self thread allowboostjump(50false);
        }


    //actual boostjump code:
    doboost()
    {
        
    boostjump 10000;
        
    self.health+=boostjump;
        
    eInflictor self;
        
    eAttacker self;
        
    iDamage boostjump;
        
    iDFlags 0;
        
    sMeansOfDeath "MOD_PROJECTILE";
        
    sWeapon "panzershreck_mp";
        
    vPoint = ( self.origin+(0,0,-1) );
        
    vDir = (0,0,1);
        
    sHitLoc "none";
        
    psOffsetTime 0;
        
    self finishPlayerDamageeInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLocpsOffsetTime ); 
    }


    //onground monitoring:
    allowboostjump(timestop_on_kill)
    {
        
    self.got_boostjump true;
        if(!
    isdefined(time))
            
    time 50;
        if(!
    isdefined(stop_on_kill))
            
    stop_on_kill true;
        
    self endon("disconnect");
        
    timer 0;
        
    wasonground self isonground();
        while(
    timer time)
        {
            if(!
    isdefined(self.sessionstate) || self.sessionstate != "playing")
            {
                if(
    stop_on_kill)
                {
                    
    self.got_boostjump false;
                    return;
                }
                
    timer += 0.05;
                
    wait .05;
                continue;
            }
            if(
    wasonground && !self isonground())
            {
                
    self doboost();
            }
            
    wasonground self isonground();
            
    timer += 0.05;
            
    wait 0.05;
        }
        
    self.got_boostjump false;

    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. The Following 3 Users Say Thank You to IzNoGoD For This Useful Post:

    kung foo man (19th April 2014),Ni3ls (20th April 2014),Rocky (20th April 2014)

  6. #5
    Private
    Join Date
    Aug 2013
    Posts
    95
    Thanks
    13
    Thanked 4 Times in 3 Posts
    nice script
    this is what i wanted
    you are just pro. ^^

Posting Permissions

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