27.08.2013, 08:43
so i have this stock which is not slowing down the vehicle -_-
it has no errors but the bug is that it is not slowing the vehicles!!!!
Код:
stock SlowDownVehicle(mph)
{
new Float:Vx,Float:Vy,Float:Vz,Float:DV,Float:multiple;
for( new c = 1; c <= MAX_VEHICLES; c ++ )
{
GetVehicleVelocity(c,Vx,Vy,Vz);
DV = floatsqroot(Vx*Vx + Vy*Vy + Vz*Vz);
if(DV > 0)
{
multiple = ((mph + DV * 100) / (DV * 100));
return SetVehicleVelocity(c,Vx*multiple,Vy*multiple,Vz*multiple);
}
}
return 0;
}

