Super fast vehicle.
#1

Hi guys, I'll try and explain this as clear as I can.

Basically I've seen before on a server that when inside a car, if you kept pressing left shift key you would go super fast when inside a vehicle. It's not nos, it's more like speed hacks, accept it was scripted into the server.

I'm basically asking how is this done? I'm wanting to add it to my script.

Any help is appreciated, thank you.
Reply
#2

https://sampwiki.blast.hk/wiki/SetVehicleVelocity

An example of using speedboost while pressing the left mouse button:
pawn Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
    if( ( newkeys & KEY_FIRE ) && !( oldkeys & KEY_FIRE ) )
    {
        if( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
        {
            new
                Float: vx,
                Float: vy,
                Float: vz
            ;
            GetVehicleVelocity( GetPlayerVehicleID( playerid ), vx, vy, vz );
            SetVehicleVelocity( GetPlayerVehicleID( playerid ), vx * 1.2, vy * 1.2, vz * 1.2 );
        }
    }
    return 1;
}
Reply
#3

It's not up to me, it is up to you can go fast and uses animation so that if I figured out
Reply
#4

Thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)