diff --git a/MISC/SetSuperJumpThisFrame.md b/MISC/SetSuperJumpThisFrame.md index 0a616a3f1..c489f48e5 100644 --- a/MISC/SetSuperJumpThisFrame.md +++ b/MISC/SetSuperJumpThisFrame.md @@ -8,7 +8,24 @@ ns: MISC cs_type(int) void SET_SUPER_JUMP_THIS_FRAME(Player player); ``` +Allows the player to perform super jumps. This function must be called every frame for it to work. +It basically OR's a flag for a single frame, allowing the ped to perform a super jump only when the flag is set. + + ## Parameters -* **player**: +* **player**: The player we are setting this for. ## Return value + +## Examples +```lua +Citizen.CreateThread(function() + while true do + SetSuperJumpThisFrame(PlayerId()) + -- Try enabling the two down below if you also want invincibility and no ragdoll effects + --SetPlayerInvincible(PlayerId(), true) + --SetPedCanRagdoll(PlayerPedId(), false) + Citizen.Wait(0) + end +end) +``` \ No newline at end of file diff --git a/PLAYER/GetPlayersLastVehicle.md b/PLAYER/GetPlayersLastVehicle.md index 8456a1904..19d1ea027 100644 --- a/PLAYER/GetPlayersLastVehicle.md +++ b/PLAYER/GetPlayersLastVehicle.md @@ -8,8 +8,11 @@ ns: PLAYER Vehicle GET_PLAYERS_LAST_VEHICLE(); ``` -``` -Alternative: GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 1); -``` +### Warning +This native will return `0` if the last vehicle the player was in was destroyed. + +### Alternative +You can use [GET_VEHICLE_PED_IS_IN](#_0x9A9112A0FE9A4713), which will actually get the last vehicle, even if it was destroyed. ## Return value +A vehicle handle containing the last player's vehicle. diff --git a/VEHICLE/GetVehicleCauseOfDestruction.md b/VEHICLE/GetVehicleCauseOfDestruction.md index 659de787f..ca7950cbe 100644 --- a/VEHICLE/GetVehicleCauseOfDestruction.md +++ b/VEHICLE/GetVehicleCauseOfDestruction.md @@ -8,16 +8,21 @@ ns: VEHICLE Hash GET_VEHICLE_CAUSE_OF_DESTRUCTION(Vehicle vehicle); ``` -``` -iVar3 = get_vehicle_cause_of_destruction(uLocal_248[iVar2]); -if (iVar3 == joaat("weapon_stickybomb")) -{ - func_171(726); - iLocal_260 = 1; -} -``` ## Parameters -* **vehicle**: +* **vehicle**: The vehicle to get the cause of destruction of. ## Return value +A hash representing the destruction cause. These can be weapon hashes. + +## Examples +```lua +local destructionCauseHash = GetVehicleCauseOfDestruction(GetVehiclePedIsIn(PlayerPedId(), true)) +if destructionCauseHash == GetHashKey("weapon_stickybomb") then + -- It looks like the vehicle was destroyed by a sticky bomb + Citizen.Trace('Vehicle was destroyed by a sticky bomb!') +elseif destructionCauseHash ~= 0 then + -- It looks like the vehicle was destroyed by something else! + Citizen.Trace('Vehicle was destroyed by: ' .. destructionCauseHash) +end +```