Help me with this please
#1

Hey guys i would like to know how i am abel to make like that if you write /jump IG then you will jump with car in the air but how i am abel to make it like i press 3 on my Numpad and it jumps? please help.
Reply
#2

NUM 3 is not a valid key: https://sampwiki.blast.hk/wiki/Keys

You can use SetVehicleVelocity and change the Z (height) parameter so the vehicle will jump.

pawn Код:
CMD:jump(playerid, params[])
{
    if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "You need to be a driver to use that command");
   
    new
        vehicleid = GetPlayerVehicleID(playerid),
        Float: vx,
        Float: vy,
        Float: vz;
       
    GetVehicleVelocity(vehicleid, vx, vy, vz);
    SetVehicleVelocity(vehicleid, vx, vy, vz + 0.3);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)