diff --git a/ENTITY/DeleteEntity.md b/ENTITY/DeleteEntity.md index 6e8fcbfc9..7a9d5d89e 100644 --- a/ENTITY/DeleteEntity.md +++ b/ENTITY/DeleteEntity.md @@ -9,7 +9,54 @@ ns: ENTITY void DELETE_ENTITY(Entity* entity); ``` -Deletes the specified entity, and invalidates the passed handle (i.e. in/out argument). +Delete the specified entity, and invalidate the passed handle (i.e., the in/out argument). +You might want to check if the entity exists before with [DOES_ENTITY_EXIST](#_0x7239B21A38F536BA). ## Parameters - **entity**: The entity to delete. + +## Examples +```lua +-- Retrieve the vehicle the player is currently in. +local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + +-- Check if the vehicle exists in the game world. +if not DoesEntityExist(vehicle) then + -- If the vehicle does not exist, end the execution of the code here. + return +end + +-- If the vehicle does exist, delete the vehicle entity from the game world. +DeleteEntity(vehicle) +``` + +```js +// Retrieve the vehicle the player is currently in. +const vehicle = GetVehiclePedIsIn(PlayerPedId(), false); + +// Check if the vehicle exists in the game world. +if (!DoesEntityExist(vehicle)) { + // If the vehicle does not exist, end the execution of the code here. + return; +} + +// If the vehicle does exist, delete the vehicle entity from the game world. +DeleteEntity(vehicle); +``` + +```cs +using static CitizenFX.Core.Native.API; + +// Retrieve the vehicle the player is currently in. +Vehicle vehicle = GetVehiclePedIsIn(PlayerPedId(), false); + +// Check if the vehicle exists in the game world. +if (!DoesEntityExist(vehicle)) +{ + // If the vehicle does not exist, end the execution of the code here. + return; +} + +// If the vehicle does exist, delete the vehicle entity from the game world. +DeleteEntity(vehicle); +``` \ No newline at end of file diff --git a/MISC/ClearWeatherTypeNowPersistNetwork.md b/MISC/ClearWeatherTypeNowPersistNetwork.md new file mode 100644 index 000000000..806965652 --- /dev/null +++ b/MISC/ClearWeatherTypeNowPersistNetwork.md @@ -0,0 +1,29 @@ +--- +ns: MISC +aliases: ["0x0CF97F497FE7D048"] +--- +## CLEAR_WEATHER_TYPE_NOW_PERSIST_NETWORK + +```c +// 0x0CF97F497FE7D048 +void CLEAR_WEATHER_TYPE_NOW_PERSIST_NETWORK(cs_type(float) int transitionTimeInMs); +``` + +Clears the active weather type after a specific amount of time determined by `transitionTimeInMs`. + +## Parameters +* **transitionTimeInMs**: Transition time in milliseconds. + +## Examples +```lua +RegisterCommand('weathertransition', function(source, args) + -- Set the weather type to foggy so we can see the change + SetWeatherTypeNowPersist("FOGGY") + -- Clear the weather and run the transition + local transitionTimeInMs = tonumber(args[1]) or 5000 + if transitionTimeInMs > 0 then + ClearWeatherTypeNowPersistNetwork(transitionTimeInMs) + end +end, false) +``` + diff --git a/MISC/N_0x0cf97f497fe7d048.md b/MISC/N_0x0cf97f497fe7d048.md deleted file mode 100644 index d54f8380a..000000000 --- a/MISC/N_0x0cf97f497fe7d048.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -ns: MISC ---- -## _0x0CF97F497FE7D048 - -```c -// 0x0CF97F497FE7D048 -void _0x0CF97F497FE7D048(float p0); -``` - -``` -0 as param = weird black and green screen -0.1 - 0.99 = Prevent rain effect from falling (still sound and effects on puddles) and prevent puddles from increase/decrease, seems than it prevent any weather change too -1 and more = "Unfreeze" rain puddles but clear weather too -When 'freezing' is enabled, it seem to also freeze value getted with GetRainLevel -``` - -## Parameters -* **p0**: - diff --git a/VEHICLE/GetVehicleDoorDestroyType.md b/VEHICLE/GetVehicleDoorDestroyType.md deleted file mode 100644 index ed9c77179..000000000 --- a/VEHICLE/GetVehicleDoorDestroyType.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -ns: VEHICLE -aliases: ["0xCA4AC3EAAE46EC7B"] ---- -## _GET_VEHICLE_DOOR_DESTROY_TYPE - -```c -// 0xCA4AC3EAAE46EC7B -int _GET_VEHICLE_DOOR_DESTROY_TYPE(Vehicle vehicle, int doorIndex); -``` - -See eDoorId declared in [`SET_VEHICLE_DOOR_SHUT`](#_0x93D9BD300D7789E5) - -Returns vehicle door destroy type previously set with _SET_VEHICLE_DOOR_DESTROY_TYPE - -## Parameters -* **vehicle**: -* **doorIndex**: - -## Return value diff --git a/VEHICLE/GetVehicleIndividualDoorLockStatus.md b/VEHICLE/GetVehicleIndividualDoorLockStatus.md new file mode 100644 index 000000000..21a430a15 --- /dev/null +++ b/VEHICLE/GetVehicleIndividualDoorLockStatus.md @@ -0,0 +1,19 @@ +--- +ns: VEHICLE +aliases: ["0xCA4AC3EAAE46EC7B", "_GET_VEHICLE_DOOR_DESTROY_TYPE"] +--- +## GET_VEHICLE_INDIVIDUAL_DOOR_LOCK_STATUS + +```c +// 0xCA4AC3EAAE46EC7B +int GET_VEHICLE_INDIVIDUAL_DOOR_LOCK_STATUS(Vehicle vehicle, int doorIndex); +``` + +See eDoorId declared in [`SET_VEHICLE_DOOR_SHUT`](#_0x93D9BD300D7789E5) + +## Parameters +* **vehicle**: +* **doorIndex**: + +## Return value +Returns vehicle door lock state previously set with [`SET_VEHICLE_INDIVIDUAL_DOORS_LOCKED`](#_0xBE70724027F85BCD) \ No newline at end of file