Vehicle speed 0 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle speed 0 (
/showthread.php?tid=552487)
Vehicle speed 0 -
VincenzoDrift - 24.12.2014
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?
Re: Vehicle speed 0 -
Abagail - 24.12.2014
You can try freezing the player if movement is detected and then unfreeze when the vehicle has stopped.
Re: Vehicle speed 0 -
VincenzoDrift - 24.12.2014
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?
Re: Vehicle speed 0 -
VincenzoDrift - 25.12.2014
UP
Re: Vehicle speed 0 -
therainycat - 25.12.2014
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?
Re: Vehicle speed 0 -
VincenzoDrift - 26.12.2014
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 ...
AW: Vehicle speed 0 -
Nero_3D - 26.12.2014
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);