Vehicle speed 0
#1

Sorry for my bud english

Is there a way to not to accelerate a vehicle with the engine running? I tried it with a timer that sets the speed of vehicle to 0 with:
Код:
SetVehicleVelocity(vehicleid, 0, 0, 0);
but the vehicle moves the same... any ideas?
Reply
#2

You can try freezing the player if movement is detected and then unfreeze when the vehicle has stopped.
Reply
#3

Quote:
Originally Posted by Abagail
Посмотреть сообщение
You can try freezing the player if movement is detected and then unfreeze when the vehicle has stopped.
I thought about that, but if I use this function...
Код:
TogglePlayerControllable(playerid, false);
...the player can't move the camera ... Any other ideas?
Reply
#4

UP
Reply
#5

I think the only way to do this is to remember vehicle pos and angle, then on any detected velocity or just by timer set the vehicle in that point.
Can you say, why you need static vehicle with running engine?
Reply
#6

I just finished to script a gear system for vehicles and everything works perfectly ... The only thing I want is that when the vehicle is in neutral with the engine running, the vehicle can't move ...
Reply
#7

Try it with OnPlayerUpdate, if that didn't work try it with the inverse velocity, that should move him constantly forward and backwards (no clue if that actually works)

pawn Код:
new
    Float: vX,
    Float: vY,
    Float: vZ
;
GetVehicleVelocity(vehicleid, vX, vY, vZ);
SetVehicleVelocity(vehicleid, -vX, -vY, -vZ);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)