Stop jumping on bikes - 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: Stop jumping on bikes (
/showthread.php?tid=307406)
Stop jumping on bikes -
HondaCBR - 30.12.2011
Im using a script to stop jumping on bikes:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_ACTION)
{
new vid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vid) == 510 || GetVehicleModel(vid) == 509 || GetVehicleModel(vid) == 481)
{
SetVehicleVelocity(vid,0.0,0.0,0.0);
SendClientMessage(playerid,0xFFFFFFFF,"Bike jumping is disabled!");
}
}
return 1;
}
It does work, it stop the bike but you can still jump, you can hold the key in after it stopped you and you jump, or you can press it quickly and you will jump just before it stops you.
So my question is what can I do with this to stop that, IDK function to release key or something, could anyone help? Thx
Re: Stop jumping on bikes -
silvan - 30.12.2011
try using TogglePlayerControllable freeze them then imediatly unfreeze.
Re: Stop jumping on bikes -
HondaCBR - 30.12.2011
Thx, done.