Vehicle velocity
#2

1. Velocity setting is not bound to anything except the air friction and maybe the integer variable capacity.
2. The thing you're about to do is to increase the maximum speed of a vehicle, which cannot be done from the server side.
3. But still, you can speed up the vehicle when it reaches 123 km/h, imagine we have a timer which calls the function "ProcessVehicleVelocity":
PHP код:
public ProcessVehicleVelocity(vehicleid)
{
      new 
Float:xvFloat:yvFloat:zv;
      
GetVehicleVelocity(vehicleidxvyvzv);
      new 
Float:tv sqrt(floatpower(xv2.0) + floatpower(yv2.0) + floatpower(zv2.0)); // some triangular equations
      
if (tv 120.00SetVehicleVelocity(vehicleidxv 1.0yv 1.0zv 1.0); // however this might add more than 1 km/h

Hope it helped ^^
Reply


Messages In This Thread
Vehicle velocity - by Shazwan - 20.05.2015, 13:58
Re: Vehicle velocity - by AnnaSB - 20.05.2015, 15:38
Re: Vehicle velocity - by Vince - 20.05.2015, 15:57
Re: Vehicle velocity - by Shazwan - 21.05.2015, 14:42
Re: Vehicle velocity - by Pottus - 21.05.2015, 14:49
Re: Vehicle velocity - by Shazwan - 21.05.2015, 15:05

Forum Jump:


Users browsing this thread: 2 Guest(s)