-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(natives): expand example and update natives for enhanced functio… (
#934) * feat(natives): expand example and update natives for enhanced functionality * Update ClearWeatherTypeNowPersistNetwork.md Provide a usage example, remove wrongly assigned alias and rename the `milliseconds` parameter to `transitionTimeInMs`. --------- Co-authored-by: ammonia-cfx <[email protected]>
- Loading branch information
Showing
5 changed files
with
96 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
``` | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |