Stop jumping on bikes
#1

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
Reply
#2

try using TogglePlayerControllable freeze them then imediatly unfreeze.
Reply
#3

Thx, done.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)