Speed boost
#8

Well that's because you are not taking current speed of vehicle into account.
EDIT:
Well first take out current speed add that speed to "speed" variable then multiply it like this -
PHP код:
stock GetVehicleSpeed(vehicleid)//to take out vehicle speed
{
    new 
Float:VxFloat:VyFloat:Vz;
    
GetVehicleVelocity(vehicleidVxVyVz);
    new 
Float:rtn;
    
rtn floatsqroot(floatpower(Vx*100,2) + floatpower(Vy*100,2));
    
rtn floatsqroot(floatpower(rtn,2) + floatpower(Vz*100,2));
    return 
floatround(rtn);
}
//now in 2nd method like this -
 
new
            
FloatAngle,
        
FloatAngleX,
        
FloatAngleY,
                
FloatVelocityX,
                
FloatVelocityY,
                
FloatVelocityZ,
                
Float:c_speed GetVehicleSpeed(vehicleid);//current speed
            
;
            
GetVehicleVelocity(vehicleidVelocityXVelocityYVelocityZ);
            
GetVehicleZAngle(vehicleidAngle);
            
AngleX floatsin(-Angledegrees);
            
AngleY floatcos(-Angledegrees);
            
SetVehicleVelocity(vehicleidAngleX * (speed+c_speed), AngleY * (speed+c_speed), VelocityZ);//note change in this line
        

Reply


Messages In This Thread
Speed boost - by CalvinC - 31.03.2015, 15:01
Re: Speed boost - by Sascha - 31.03.2015, 18:14
Re: Speed boost - by CalvinC - 31.03.2015, 18:32
Re: Speed boost - by Sascha - 31.03.2015, 19:04
Re: Speed boost - by CalvinC - 31.03.2015, 20:18
Re: Speed boost - by Gammix - 01.04.2015, 06:42
Re: Speed boost - by CalvinC - 01.04.2015, 09:33
Re: Speed boost - by BroZeus - 01.04.2015, 09:59
Re: Speed boost - by Sascha - 01.04.2015, 23:50

Forum Jump:


Users browsing this thread: 1 Guest(s)