Setting Speed Question - 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: Setting Speed Question (
/showthread.php?tid=399686)
Setting Speed Question -
jakejohnsonusa - 15.12.2012
Is it possible to make a playerid thats driving stop, as in their car applies the brakes? I need this for a tutorial checkpoint, I want when they land on the tut checkpoint their vehicle stops (so it doesn't keep moving). Anyone know how to do this?
Thanks: jakejohnsonusa
Re: Setting Speed Question -
Windrush - 15.12.2012
https://sampforum.blast.hk/showthread.php?tid=187229
Re: Setting Speed Question -
jakejohnsonusa - 15.12.2012
I am not asking for anything made. I am asking if it's possible... Anyone know?
Re: Setting Speed Question -
maramizo - 15.12.2012
Using
SetPlayerVelocity(playerid, 0, 0, 0);
Re: Setting Speed Question -
jakejohnsonusa - 15.12.2012
So this will make their car stop also?
Re: Setting Speed Question -
maramizo - 15.12.2012
Oh, right.
pawn Код:
if(IsPlayerInAnyVehicle(playerid)) SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
Re: Setting Speed Question -
zDevon - 16.12.2012
Or TogglePlayerControllable when they enter a checkpoint. Then reset it on a timer or command or whatever your tutorial includes. With the SetVehicleVelocity method they can just keep driving after you stop them.
Re: Setting Speed Question -
maramizo - 16.12.2012
Quote:
Originally Posted by zDevon
Or TogglePlayerControllable when they enter a checkpoint. Then reset it on a timer or command or whatever your tutorial includes. With the SetVehicleVelocity method they can just keep driving after you stop them.
|
Quote:
I want when they land on the tut checkpoint their vehicle stops (so it doesn't keep moving).
|
Using TogglePlayerControllable(playerid, 0); , this would prevent them from moving at all, the car wouldn't apply any brakes and it would be a sudden movement, which is non-realistic and IMO annoying.