diff --git a/CAM/PlaySynchronizedCamAnim.md b/CAM/PlaySynchronizedCamAnim.md index 291074175..2c62c6f0e 100644 --- a/CAM/PlaySynchronizedCamAnim.md +++ b/CAM/PlaySynchronizedCamAnim.md @@ -5,7 +5,7 @@ ns: CAM ```c // 0xE32EFE9AB4A9AA0C 0x9458459E -BOOL PLAY_SYNCHRONIZED_CAM_ANIM(Any p0, Any p1, char* animName, char* animDictionary); +BOOL PLAY_SYNCHRONIZED_CAM_ANIM(Cam camera, int scene, char* animName, char* animDictionary); ``` ``` @@ -17,8 +17,8 @@ CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_F0D[7/*1*/], l_F4D[15/*1*/], "ah3b_attackheli_ [Animations list](https://alexguirre.github.io/animations-list/) ## Parameters -* **p0**: -* **p1**: +* **camera**: +* **scene**: * **animName**: * **animDictionary**: diff --git a/CAM/SetCamParams.md b/CAM/SetCamParams.md index e688439be..70e2f2677 100644 --- a/CAM/SetCamParams.md +++ b/CAM/SetCamParams.md @@ -5,7 +5,7 @@ ns: CAM ```c // 0xBFD8727AEA3CCEBA 0x2167CEBF -void SET_CAM_PARAMS(Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, Any p8, int p9, int p10, int p11); +void SET_CAM_PARAMS(Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, int transitionSpeed, int p9, int p10, int rotationOrder); ``` @@ -18,8 +18,24 @@ void SET_CAM_PARAMS(Cam cam, float posX, float posY, float posZ, float rotX, flo * **rotY**: * **rotZ**: * **fieldOfView**: -* **p8**: +* **transitionSpeed**: The speed of transition/interpolation to these new values * **p9**: * **p10**: -* **p11**: +* **rotationOrder**: The order of rotation, see [`GET_ENTITY_ROTATION`](#_0xAFBD61CC738D9EB9) +### Examples +```lua +-- This is recreating the above mentioned heli transition from finale_heist2a.c + local cam = CreateCameraWithParams('DEFAULT_SCRIPTED_CAMERA', -1659.574, -707.8544, 29.23778, -7.422939, 0.059666, -117.3886, 43.0557, false, 2) +SetCamActive(cam, true) +RenderScriptCams(true, false, 3000, true, false, false) +SetCamParams(cam, -1660.919, -710.7487, 28.88381, -7.50235, 0.059666, -111.7328, 43.0557, 9100, 0, 0, 2); +``` + +```js +// This is recreating the above mentioned heli transition from finale_heist2a.c +let cam = CreateCameraWithParams('DEFAULT_SCRIPTED_CAMERA', -1659.574, -707.8544, 29.23778, -7.422939, 0.059666, -117.3886, 43.0557, false, 2) +SetCamActive(cam, true) +RenderScriptCams(true, false, 3000, true, false, false) +SetCamParams(cam, -1660.919, -710.7487, 28.88381, -7.50235, 0.059666, -111.7328, 43.0557, 9100, 0, 0, 2); +``` diff --git a/GRAPHICS/CreateCheckpoint.md b/GRAPHICS/CreateCheckpoint.md index 07183c55f..bc5986234 100644 --- a/GRAPHICS/CreateCheckpoint.md +++ b/GRAPHICS/CreateCheckpoint.md @@ -5,17 +5,17 @@ ns: GRAPHICS ```c // 0x0134F0835AB6BFCB 0xF541B690 -int CREATE_CHECKPOINT(int type, float posX1, float posY1, float posZ1, float posX2, float posY2, float posZ2, float radius, int red, int green, int blue, int alpha, int reserved); +int CREATE_CHECKPOINT(int type, float posX1, float posY1, float posZ1, float posX2, float posY2, float posZ2, float diameter, int red, int green, int blue, int alpha, int reserved); ``` ``` Creates a checkpoint. Returns the handle of the checkpoint. -20/03/17 : Attention, checkpoints are already handled by the game itself, so you must not loop it like markers. +20/03/17 : Attention, checkpoints are already handled by the game itself, so you must not loop it like markers. Parameters: * type - The type of checkpoint to create. See below for a list of checkpoint types. * pos1 - The position of the checkpoint. * pos2 - The position of the next checkpoint to point to. -* radius - The radius of the checkpoint. +* diameter - The diameter of the checkpoint. * color - The color of the checkpoint. * reserved - Special parameter, see below for details. Usually set to 0 in the scripts. Checkpoint types (prior to game build 2189): @@ -55,7 +55,7 @@ If using type 42-44, reserved sets number / number and shape to display * **posX2**: * **posY2**: * **posZ2**: -* **radius**: +* **diameter**: * **red**: * **green**: * **blue**: diff --git a/HUD/AddTextComponentFloat.md b/HUD/AddTextComponentFloat.md index 66140e5b4..d63abc2da 100644 --- a/HUD/AddTextComponentFloat.md +++ b/HUD/AddTextComponentFloat.md @@ -8,8 +8,21 @@ ns: HUD void ADD_TEXT_COMPONENT_FLOAT(float value, int decimalPlaces); ``` +Adds a float to a text component placeholder, replacing `~1~` in the current text command's text label. + +![Example output](https://i.imgur.com/jvuQ0II.png) ## Parameters -* **value**: -* **decimalPlaces**: +* **value**: The number to substitute in the label. +* **decimalPlaces**: How many decimal places to add + +## Examples +```lua +-- on initialization +AddTextEntry('TEST_LABEL', 'Label: ~1~') +-- when drawing +BeginTextCommandThefeedPost('TEST_LABEL') +AddTextComponentFloat(1000.0, 2) +EndTextCommandThefeedPostTicker(false, true) +``` diff --git a/HUD/AddTextComponentFormattedInteger.md b/HUD/AddTextComponentFormattedInteger.md index bdfbeeba6..2a7717729 100644 --- a/HUD/AddTextComponentFormattedInteger.md +++ b/HUD/AddTextComponentFormattedInteger.md @@ -11,6 +11,18 @@ void ADD_TEXT_COMPONENT_FORMATTED_INTEGER(int value, BOOL commaSeparated); ## Parameters -* **value**: -* **commaSeparated**: +* **value**: The integer to add to the string +* **commaSeparated**: Whether or not to add comma seperators. So if true 1000 would become 1,000. +Adds a formatted integer as a text component placeholder, replacing ~a~ in the current text command's text label. + +## Examples +```lua +-- on initialization +AddTextEntry('TEST_LABEL', '€~a~') + +-- when drawing +BeginTextCommandThefeedPost('TEST_LABEL') +AddTextComponentFormattedInteger(1000, true) +EndTextCommandThefeedPostTicker(false, true) +``` diff --git a/HUD/DisplayCash.md b/HUD/DisplayCash.md index 09425aa9d..921f6ee69 100644 --- a/HUD/DisplayCash.md +++ b/HUD/DisplayCash.md @@ -5,14 +5,14 @@ ns: HUD ```c // 0x96DEC8D5430208B7 0x0049DF83 -void DISPLAY_CASH(BOOL toggle); +void DISPLAY_CASH(BOOL display); ``` ``` -"DISPLAY_CASH(false);" makes the cash amount render on the screen when appropriate -"DISPLAY_CASH(true);" disables cash amount rendering +"DISPLAY_CASH(true);" makes the cash amount render on the screen when appropriate +"DISPLAY_CASH(false);" disables cash amount rendering ``` ## Parameters -* **toggle**: +* **display**: diff --git a/HUD/SetBigmapActive.md b/HUD/SetBigmapActive.md index 9c46588dd..2a5058647 100644 --- a/HUD/SetBigmapActive.md +++ b/HUD/SetBigmapActive.md @@ -11,7 +11,7 @@ void SET_BIGMAP_ACTIVE(BOOL toggleBigMap, BOOL showFullMap); Toggles the big minimap state like in GTA:Online. -To get the current state of the minimap, use [`GetBigmapActive`](#_0xF6AE18A7). +To get the current state of the minimap, use [`IS_BIGMAP_ACTIVE`](#_0xFFF65C63). ## Parameters * **toggleBigMap**: Enable or disable the expanded minimap. diff --git a/HUD/SetBlipColour.md b/HUD/SetBlipColour.md index 9f1c3e1ca..646b045bd 100644 --- a/HUD/SetBlipColour.md +++ b/HUD/SetBlipColour.md @@ -8,51 +8,7 @@ ns: HUD void SET_BLIP_COLOUR(Blip blip, int color); ``` -``` -(Hex code are approximate) -0: White (#fefefe) -1: Red (#e03232) -2: Green (#71cb71) -3: Blue (#5db6e5) -4: White (#fefefe) -5: Taxi Yellow (#eec64e) -6: Light Red (#c25050) -7: Violet (#9c6eaf) -8: Pink (#fe7ac3) -9: Light Orange (#f59d79) -10: Light Brown (#b18f83) -11: Light Green (#8dcea7) -12: Light Blue (Teal) (#70a8ae) -13: Very Light Purple (#d3d1e7) -14: Dark Purple (#8f7e98) -15: Cyan (#6ac4bf) -16: Light Yellow (#d5c398) -17: Orange (#ea8e50) -18: Light Blue (#97cae9) -19: Dark Pink (#b26287) -20: Dark Yellow (#8f8d79) -21: Dark Orange (#a6755e) -22: Light Gray (#afa8a8) -23: Light Pink (#e78d9a) -24: Lemon Green (#bbd65b) -25: Forest Green (#0c7b56) -26: Electric Blue (#7ac3fe) -27: Bright Purple (#ab3ce6) -28: Dark Taxi Yellow (#cda80c) -29: Dark Blue (#4561ab) -30: Dark Cyan (#29a5b8) -31: Light Brown (#b89b7b) -32: Very Light Blue (#c8e0fe) -33: Light Yellow (#f0f096) -34: Light Pink (#ed8ca1) -35: Light Red (#f98a8a) -36: Light Yellow (#fbeea5) -37: White (#fefefe) -38: Blue (#2c6db8) -39: Light Gray (#9a9a9a) -40: Dark Gray (#4c4c4c) -Certainly a lot more remaining. -``` +See https://docs.fivem.net/docs/game-references/blips/#BlipColors ## Parameters * **blip**: diff --git a/HUD/SetBlipFlashInterval.md b/HUD/SetBlipFlashInterval.md index 0e229a563..a45198fd9 100644 --- a/HUD/SetBlipFlashInterval.md +++ b/HUD/SetBlipFlashInterval.md @@ -5,11 +5,29 @@ ns: HUD ```c // 0xAA51DB313C010A7E 0xEAF67377 -void SET_BLIP_FLASH_INTERVAL(Blip blip, Any p1); +void SET_BLIP_FLASH_INTERVAL(Blip blip, int interval); ``` +Sets the interval in milliseconds before flashing the blip. ## Parameters -* **blip**: -* **p1**: +* **blip**: The blip to change flashing interval +* **interval**: Interval in milliseconds before flashing the blip +## Examples +```lua +local blip = AddBlipForCoord(0, 0, 0) + +SetBlipFlashes(blip, true) + +-- flash the blip every 50ms +SetBlipFlashInterval(blip, 50) +``` +```js +const blip = AddBlipForCoord(0, 0, 0) + +SetBlipFlashes(blip, true) + +// flash the blip every 50ms +SetBlipFlashInterval(blip, 50) +``` diff --git a/HUD/SetBlipFlashTimer.md b/HUD/SetBlipFlashTimer.md index 7dd0c2724..1b83df5bd 100644 --- a/HUD/SetBlipFlashTimer.md +++ b/HUD/SetBlipFlashTimer.md @@ -8,11 +8,23 @@ ns: HUD void SET_BLIP_FLASH_TIMER(Blip blip, int duration); ``` -``` -Adds up after viewing multiple R* scripts. I believe that the duration is in miliseconds. -``` +Flashes blip for time in milliseconds before stopping. ## Parameters -* **blip**: -* **duration**: +* **blip**: The blip to start flashing +* **duration**: Time in milliseconds to flash the blip before stopping +## Examples +```lua +local blip = AddBlipForCoord(0, 0, 0) + +-- flash blip for seven seconds then stop +SetBlipFlashTimer(blip, 7000) +``` + +```js +const blip = AddBlipForCoord(0, 0, 0) + +//flash blip for seven seconds then stop +SetBlipFlashTimer(blip, 7000) +``` diff --git a/NETWORK/N_0xcae55f48d3d7875c.md b/NETWORK/N_0xcae55f48d3d7875c.md deleted file mode 100644 index 83e67127f..000000000 --- a/NETWORK/N_0xcae55f48d3d7875c.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -ns: NETWORK ---- -## _0xCAE55F48D3D7875C - -```c -// 0xCAE55F48D3D7875C 0x5BE529F7 -void _0xCAE55F48D3D7875C(int p0); -``` - -``` -NETWORK_SESSION_* - -p0 must be <= 4 -``` - -## Parameters -* **p0**: - diff --git a/NETWORK/NetworkAddSynchronisedSceneCamera.md b/NETWORK/NetworkAddSynchronisedSceneCamera.md new file mode 100644 index 000000000..9b9b218fa --- /dev/null +++ b/NETWORK/NetworkAddSynchronisedSceneCamera.md @@ -0,0 +1,16 @@ +--- +ns: NETWORK +aliases: ["0xCF8BD3B0BD6D42D7","_NETWORK_FORCE_LOCAL_USE_OF_SYNCED_SCENE_CAMERA"] +--- +## NETWORK_ADD_SYNCHRONISED_SCENE_CAMERA + +```c +// 0xCF8BD3B0BD6D42D7 0xBFFE8B5C +void NETWORK_ADD_SYNCHRONISED_SCENE_CAMERA(int netScene, char* animDict, char* animName); +``` + +## Parameters +* **netScene**: +* **animDict**: +* **animName**: + diff --git a/NETWORK/NetworkConvertSynchronisedSceneToSynchronizedScene.md b/NETWORK/NetworkConvertSynchronisedSceneToSynchronizedScene.md deleted file mode 100644 index 9d98e5937..000000000 --- a/NETWORK/NetworkConvertSynchronisedSceneToSynchronizedScene.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -ns: NETWORK -aliases: ["0x02C40BF885C567B6","_NETWORK_UNLINK_NETWORKED_SYNCHRONISED_SCENE"] ---- -## _NETWORK_CONVERT_SYNCHRONISED_SCENE_TO_SYNCHRONIZED_SCENE - -```c -// 0x02C40BF885C567B6 0x16AED87B -int _NETWORK_CONVERT_SYNCHRONISED_SCENE_TO_SYNCHRONIZED_SCENE(int netScene); -``` - -``` -netScene to scene -``` - -## Parameters -* **netScene**: - -## Return value diff --git a/NETWORK/NetworkForceLocalUseOfSyncedSceneCamera.md b/NETWORK/NetworkForceLocalUseOfSyncedSceneCamera.md deleted file mode 100644 index d707e0ef1..000000000 --- a/NETWORK/NetworkForceLocalUseOfSyncedSceneCamera.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -ns: NETWORK -aliases: ["0xCF8BD3B0BD6D42D7"] ---- -## _NETWORK_FORCE_LOCAL_USE_OF_SYNCED_SCENE_CAMERA - -```c -// 0xCF8BD3B0BD6D42D7 0xBFFE8B5C -void _NETWORK_FORCE_LOCAL_USE_OF_SYNCED_SCENE_CAMERA(int netScene, char* animDict, char* animName); -``` - - -## Parameters -* **netScene**: -* **animDict**: -* **animName**: - diff --git a/NETWORK/NetworkGetLocalSceneFromNetworkId.md b/NETWORK/NetworkGetLocalSceneFromNetworkId.md new file mode 100644 index 000000000..e13493e1c --- /dev/null +++ b/NETWORK/NetworkGetLocalSceneFromNetworkId.md @@ -0,0 +1,15 @@ +--- +ns: NETWORK +aliases: ["0x02C40BF885C567B6","_NETWORK_UNLINK_NETWORKED_SYNCHRONISED_SCENE","_NETWORK_CONVERT_SYNCHRONISED_SCENE_TO_SYNCHRONIZED_SCENE"] +--- +## NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID + +```c +// 0x02C40BF885C567B6 0x16AED87B +int NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID(int netId); +``` + +## Parameters +* **netId**: + +## Return value diff --git a/NETWORK/NetworkSessionAddActiveMatchmakingGroup.md b/NETWORK/NetworkSessionAddActiveMatchmakingGroup.md new file mode 100644 index 000000000..8f545bce5 --- /dev/null +++ b/NETWORK/NetworkSessionAddActiveMatchmakingGroup.md @@ -0,0 +1,14 @@ +--- +ns: NETWORK +aliases: ["0xCAE55F48D3D7875C"] +--- +## NETWORK_SESSION_ADD_ACTIVE_MATCHMAKING_GROUP + +```c +// 0xCAE55F48D3D7875C 0x5BE529F7 +void NETWORK_SESSION_ADD_ACTIVE_MATCHMAKING_GROUP(int groupId); +``` + +## Parameters +* **groupId**: An identifier value between zero and four + diff --git a/NETWORK/SetEntityLocallyVisible.md b/NETWORK/SetEntityLocallyVisible.md index 9c67946ba..540bfb300 100644 --- a/NETWORK/SetEntityLocallyVisible.md +++ b/NETWORK/SetEntityLocallyVisible.md @@ -19,10 +19,10 @@ Sets the provided entity visible for yourself for the current frame. CreateThread(function() -- Any random entity should work local entity = GetVehiclePedIsIn(PlayerPedId(), false) + -- Sets the entity not visible to other players + SetEntityVisible(entity, false) while true do Wait(0) - -- Sets the entity not visible to other players - SetEntityVisible(entity, false, false) -- Sets the entity as visible for yourself SetEntityLocallyVisible(entity) end diff --git a/PAD/SetControlNormal.md b/PAD/SetControlNormal.md index 5fdd31024..79f29ec2c 100644 --- a/PAD/SetControlNormal.md +++ b/PAD/SetControlNormal.md @@ -14,6 +14,6 @@ This is for simulating player input. ## Parameters * **padIndex**: The control system instance to use. See [`ENABLE_ALL_CONTROL_ACTIONS`](#_0xA5FFE9B05F199DE7). * **control**: The [control ID](https://docs.fivem.net/docs/game-references/controls/#controls) to check. -* **amount**: A value from 0.0 to 1.0 +* **amount**: An unbounded normal value. ## Return value diff --git a/PATHFIND/AddNavmeshBlockingObject.md b/PATHFIND/AddNavmeshBlockingObject.md index b2e65f2d0..1153d7536 100644 --- a/PATHFIND/AddNavmeshBlockingObject.md +++ b/PATHFIND/AddNavmeshBlockingObject.md @@ -5,19 +5,22 @@ ns: PATHFIND ```c // 0xFCD5C8E06E502F5A 0x2952BA56 -Any ADD_NAVMESH_BLOCKING_OBJECT(float p0, float p1, float p2, float p3, float p4, float p5, float p6, BOOL p7, Any p8); +Any ADD_NAVMESH_BLOCKING_OBJECT(float x, float y, float z, float width, float length, float height, float heading, BOOL p7, Any p8); ``` +Creates a navmesh blocking object, vehicles will avoid driving through this area. + +Only 32 blocking objects may exist at a given time and must be manually managed. See [`REMOVE_NAVMESH_BLOCKING_OBJECT`](#\_0x46399A7895957C0E) and [onResourceStop](https://docs.fivem.net/docs/scripting-reference/events/list/onResourceStop/) ## Parameters -* **p0**: -* **p1**: -* **p2**: -* **p3**: -* **p4**: -* **p5**: -* **p6**: -* **p7**: -* **p8**: +* **x**: The x coordinate to create the block on. +* **y**: The y coordinate. +* **z**: The z coordinate. +* **width**: The width of the block. +* **length**: The length of the block. +* **height**: The height of the block. +* **heading**: The heading of object in degrees. +* **p7**: Usually false. +* **p8**: A bitfield; usually 7. ## Return value diff --git a/PED/ResetPedMovementClipset.md b/PED/ResetPedMovementClipset.md index 65d6116fc..499557d61 100644 --- a/PED/ResetPedMovementClipset.md +++ b/PED/ResetPedMovementClipset.md @@ -5,17 +5,10 @@ ns: PED ```c // 0xAA74EC0CB0AAEA2C 0xB83CEE93 -void RESET_PED_MOVEMENT_CLIPSET(Ped ped, float p1); -``` - -``` -If p1 is 0.0, I believe you are back to normal. -If p1 is 1.0, it looks like you can only rotate the ped, not walk. -Using the following code to reset back to normal -PED::RESET_PED_MOVEMENT_CLIPSET(PLAYER::PLAYER_PED_ID(), 0.0); +void RESET_PED_MOVEMENT_CLIPSET(Ped ped, float transitionSpeed); ``` ## Parameters * **ped**: -* **p1**: +* **transitionSpeed**: diff --git a/PLAYER/StartPlayerTeleport.md b/PLAYER/StartPlayerTeleport.md index 447795ff2..69f320da3 100644 --- a/PLAYER/StartPlayerTeleport.md +++ b/PLAYER/StartPlayerTeleport.md @@ -5,11 +5,7 @@ ns: PLAYER ```c // 0xAD15F075A4DA0FDE 0xC552E06C -void START_PLAYER_TELEPORT(Player player, float x, float y, float z, float heading, BOOL p5, BOOL findCollisionLand, BOOL p7); -``` - -``` -`findCollisionLand`: This teleports the player to land when set to true and will not consider the Z coordinate parameter provided by you. It will automatically put the Z coordinate so that you don't fall from sky. +void START_PLAYER_TELEPORT(Player player, float x, float y, float z, float heading, BOOL teleportWithVehicle, BOOL findCollisionLand, BOOL p7); ``` ## Parameters @@ -18,6 +14,6 @@ void START_PLAYER_TELEPORT(Player player, float x, float y, float z, float headi * **y**: * **z**: * **heading**: -* **p5**: -* **findCollisionLand**: This teleports the player to land when set to true and will not consider the Z coordinate parameter provided by you. It will automatically put the Z coordinate so that you don't fall from sky. +* **teleportWithVehicle**: Teleports the player along with the vehicle they are in. +* **findCollisionLand**: Attempt to find a ground coordinate at the given XY location; overriding the Z value. * **p7**: diff --git a/VEHICLE/AttachContainerToHandlerFrame.md b/VEHICLE/AttachContainerToHandlerFrame.md new file mode 100644 index 000000000..7f3673c43 --- /dev/null +++ b/VEHICLE/AttachContainerToHandlerFrame.md @@ -0,0 +1,14 @@ +--- +ns: VEHICLE +--- +## _ATTACH_CONTAINER_TO_HANDLER_FRAME + +```c +// 0x6A98C2ECF57FA5D4 0x20AB5783 +void _ATTACH_CONTAINER_TO_HANDLER_FRAME(Vehicle handler, Entity container); +``` + +## Parameters +* **handler**: +* **container**: + diff --git a/VEHICLE/DisableIndividualPlanePropeller.md b/VEHICLE/DisableIndividualPlanePropeller.md new file mode 100644 index 000000000..6ff913cd3 --- /dev/null +++ b/VEHICLE/DisableIndividualPlanePropeller.md @@ -0,0 +1,15 @@ +--- +ns: VEHICLE +aliases: ["0x500873A45724C863","_DISABLE_PLANE_PROPELLER"] +--- +## DISABLE_INDIVIDUAL_PLANE_PROPELLER + +```c +// 0x500873A45724C863 0x004926A3 +void DISABLE_INDIVIDUAL_PLANE_PROPELLER(Vehicle vehicle, int propeller); +``` + +## Parameters +* **vehicle**: +* **propeller**: + diff --git a/VEHICLE/DisablePlanePropeller.md b/VEHICLE/DisablePlanePropeller.md deleted file mode 100644 index 13681dd39..000000000 --- a/VEHICLE/DisablePlanePropeller.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -ns: VEHICLE -aliases: ["0x500873A45724C863"] ---- -## _DISABLE_PLANE_PROPELLER - -```c -// 0x500873A45724C863 0x004926A3 -void _DISABLE_PLANE_PROPELLER(Vehicle vehicle, int propeller); -``` - -## Parameters -* **vehicle**: -* **propeller**: - diff --git a/VEHICLE/GetModSlotName.md b/VEHICLE/GetModSlotName.md index cf8c29bfd..ba21e93d9 100644 --- a/VEHICLE/GetModSlotName.md +++ b/VEHICLE/GetModSlotName.md @@ -8,12 +8,8 @@ ns: VEHICLE char* GET_MOD_SLOT_NAME(Vehicle vehicle, int modType); ``` -``` -Returns the name for the type of vehicle mod(Armour, engine etc) -``` - ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). ## Return value diff --git a/VEHICLE/GetModTextLabel.md b/VEHICLE/GetModTextLabel.md index 8955823f6..41cda25c5 100644 --- a/VEHICLE/GetModTextLabel.md +++ b/VEHICLE/GetModTextLabel.md @@ -15,7 +15,7 @@ Use _GET_LABEL_TEXT to get the part name in the game's language ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). * **modValue**: ## Return value diff --git a/VEHICLE/GetNumVehicleMods.md b/VEHICLE/GetNumVehicleMods.md index 846ebe014..df58681f8 100644 --- a/VEHICLE/GetNumVehicleMods.md +++ b/VEHICLE/GetNumVehicleMods.md @@ -14,6 +14,6 @@ Returns how many possible mods a vehicle has for a given mod type ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). ## Return value diff --git a/VEHICLE/GetVehicleMod.md b/VEHICLE/GetVehicleMod.md index 14b8b8784..400f69d18 100644 --- a/VEHICLE/GetVehicleMod.md +++ b/VEHICLE/GetVehicleMod.md @@ -9,12 +9,11 @@ int GET_VEHICLE_MOD(Vehicle vehicle, int modType); ``` ``` -In b944, there are 50 (0 - 49) mod types. Returns -1 if the vehicle mod is stock ``` ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). ## Return value diff --git a/VEHICLE/GetVehicleModIdentifierHash.md b/VEHICLE/GetVehicleModIdentifierHash.md index 3731c532c..c1cdcd1dc 100644 --- a/VEHICLE/GetVehicleModIdentifierHash.md +++ b/VEHICLE/GetVehicleModIdentifierHash.md @@ -15,7 +15,7 @@ Can be used for IS_DLC_VEHICLE_MOD and _0xC098810437312FFF ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). * **modIndex**: ## Return value diff --git a/VEHICLE/GetVehicleModModifierValue.md b/VEHICLE/GetVehicleModModifierValue.md index 655fe5a98..b4573b331 100644 --- a/VEHICLE/GetVehicleModModifierValue.md +++ b/VEHICLE/GetVehicleModModifierValue.md @@ -11,7 +11,7 @@ float GET_VEHICLE_MOD_MODIFIER_VALUE(Vehicle vehicle, int modType, int modIndex) ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). * **modIndex**: ## Return value diff --git a/VEHICLE/GetVehicleModVariation.md b/VEHICLE/GetVehicleModVariation.md index 21ceb88f7..edf72ff2d 100644 --- a/VEHICLE/GetVehicleModVariation.md +++ b/VEHICLE/GetVehicleModVariation.md @@ -14,6 +14,6 @@ Only used for wheels(ModType = 23/24) Returns true if the wheels are custom whee ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). ## Return value diff --git a/VEHICLE/GetVehicleWheelType.md b/VEHICLE/GetVehicleWheelType.md index 7b87208d6..e43c47a69 100644 --- a/VEHICLE/GetVehicleWheelType.md +++ b/VEHICLE/GetVehicleWheelType.md @@ -8,25 +8,27 @@ ns: VEHICLE int GET_VEHICLE_WHEEL_TYPE(Vehicle vehicle); ``` -``` -Returns an int -Wheel Types: -0: Sport -1: Muscle -2: Lowrider -3: SUV -4: Offroad -5: Tuner -6: Bike Wheels -7: High End -8: Benny's Original -9: Benny's Bespoke -10: Open Wheel -11: Street -Tested in Los Santos Customs +```c +enum eVehicleWheelType +{ + VWT_SPORT = 0, + VWT_MUSCLE = 1, + VWT_LOWRIDER = 2, + VWT_SUV = 3, + VWT_OFFROAD = 4, + VWT_TUNER = 5, + VWT_BIKE = 6, + VWT_HIEND = 7, + VWT_SUPERMOD1 = 8, // Benny's Original + VWT_SUPERMOD2 = 9, // Benny's Bespoke + VWT_SUPERMOD3 = 10, // Open Wheel + VWT_SUPERMOD4 = 11, // Street + VWT_SUPERMOD5 = 12, // Track +}; ``` ## Parameters -* **vehicle**: +* **vehicle**: ## Return value +Returns an eVehicleWheelType integer value. diff --git a/VEHICLE/IsToggleModOn.md b/VEHICLE/IsToggleModOn.md index b9ef1097b..dd15ef77a 100644 --- a/VEHICLE/IsToggleModOn.md +++ b/VEHICLE/IsToggleModOn.md @@ -11,6 +11,6 @@ BOOL IS_TOGGLE_MOD_ON(Vehicle vehicle, int modType); ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). ## Return value diff --git a/VEHICLE/N_0x6a98c2ecf57fa5d4.md b/VEHICLE/N_0x6a98c2ecf57fa5d4.md deleted file mode 100644 index 9864478de..000000000 --- a/VEHICLE/N_0x6a98c2ecf57fa5d4.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -ns: VEHICLE ---- -## _0x6A98C2ECF57FA5D4 - -```c -// 0x6A98C2ECF57FA5D4 0x20AB5783 -void _0x6A98C2ECF57FA5D4(Vehicle vehicle, Entity entity); -``` - - -## Parameters -* **vehicle**: -* **entity**: - diff --git a/VEHICLE/PreloadVehicleMod.md b/VEHICLE/PreloadVehicleMod.md index 17ae8fea4..a267e7ded 100644 --- a/VEHICLE/PreloadVehicleMod.md +++ b/VEHICLE/PreloadVehicleMod.md @@ -11,6 +11,6 @@ void PRELOAD_VEHICLE_MOD(Any p0, int modType, Any p2); ## Parameters * **p0**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). * **p2**: diff --git a/VEHICLE/RemoveVehicleMod.md b/VEHICLE/RemoveVehicleMod.md index a11f46c7b..52b6bea90 100644 --- a/VEHICLE/RemoveVehicleMod.md +++ b/VEHICLE/RemoveVehicleMod.md @@ -11,5 +11,5 @@ void REMOVE_VEHICLE_MOD(Vehicle vehicle, int modType); ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). diff --git a/VEHICLE/SetRandomTrains.md b/VEHICLE/SetRandomTrains.md index b0985d1c2..e45116e0a 100644 --- a/VEHICLE/SetRandomTrains.md +++ b/VEHICLE/SetRandomTrains.md @@ -8,7 +8,18 @@ ns: VEHICLE void SET_RANDOM_TRAINS(BOOL toggle); ``` +Enables spawning random trains on the preset tracks. + +Requires [`SWITCH_TRAIN_TRACK`](#_0xFD813BB7DB977F20) and [`SET_TRAIN_TRACK_SPAWN_FREQUENCY`](#_0x21973BBF8D17EDFA) to be set. ## Parameters -* **toggle**: +* **toggle**: Whether to enable random trains. +## Examples +```lua +SwitchTrainTrack(0, true) -- Setting the Main train track(s) around LS and towards Sandy Shores active +SwitchTrainTrack(3, true) -- Setting the Metro tracks active +SetTrainTrackSpawnFrequency(0, 120000) -- The Train spawn frequency set for the game engine +SetTrainTrackSpawnFrequency(3, 120000) -- The Metro spawn frequency set for the game engine +SetRandomTrains(true) -- Telling the game we want to use randomly spawned trains +``` diff --git a/VEHICLE/SetVehicleColours.md b/VEHICLE/SetVehicleColours.md index c9f0275cc..708fc6751 100644 --- a/VEHICLE/SetVehicleColours.md +++ b/VEHICLE/SetVehicleColours.md @@ -8,13 +8,9 @@ ns: VEHICLE void SET_VEHICLE_COLOURS(Vehicle vehicle, int colorPrimary, int colorSecondary); ``` -``` -colorPrimary & colorSecondary are the paint index for the vehicle. +colorPrimary & colorSecondary are the paint indexes for the vehicle. + For a list of valid paint indexes, view: pastebin.com/pwHci0xK -------------------------------------------------------------------------- -Use this to get the number of color indices: pastebin.com/RQEeqTSM -Note: minimum color index is 0, maximum color index is (numColorIndices - 1) -``` ## Parameters * **vehicle**: diff --git a/VEHICLE/SetVehicleMod.md b/VEHICLE/SetVehicleMod.md index d35de56fa..881096f31 100644 --- a/VEHICLE/SetVehicleMod.md +++ b/VEHICLE/SetVehicleMod.md @@ -8,41 +8,61 @@ ns: VEHICLE void SET_VEHICLE_MOD(Vehicle vehicle, int modType, int modIndex, BOOL customTires); ``` -``` -In b944, there are 50 (0 - 49) mod types. -Sets the vehicle mod. -The vehicle must have a mod kit first. -Any out of range ModIndex is stock. -#Mod Type -Spoilers -Front Bumper -Rear Bumper -Side Skirt -Exhaust -Frame -Grille -Hood -Fender -Right Fender -Roof -Engine -Brakes -Transmission -Horns - 14 (modIndex from 0 to 51) -Suspension -Armor -Front Wheels -Back Wheels - 24 //only for motocycles -Plate holders -Trim Design -Ornaments -Dial Design -Steering Wheel -Shifter Leavers -Plaques -Hydraulics -Livery -ENUMS: pastebin.com/QzEAn02v +```c +// eVehicleModType values modified to conform to script native reorganization (see 0x140D25327 in 1604). +enum eVehicleModType +{ + VMT_SPOILER = 0, + VMT_BUMPER_F = 1, + VMT_BUMPER_R = 2, + VMT_SKIRT = 3, + VMT_EXHAUST = 4, + VMT_CHASSIS = 5, + VMT_GRILL = 6, + VMT_BONNET = 7, + VMT_WING_L = 8, + VMT_WING_R = 9, + VMT_ROOF = 10, + VMT_ENGINE = 11, + VMT_BRAKES = 12, + VMT_GEARBOX = 13, + VMT_HORN = 14, + VMT_SUSPENSION = 15, + VMT_ARMOUR = 16, + VMT_NITROUS = 17, + VMT_TURBO = 18, + VMT_SUBWOOFER = 19, + VMT_TYRE_SMOKE = 20, + VMT_HYDRAULICS = 21, + VMT_XENON_LIGHTS = 22, + VMT_WHEELS = 23, + VMT_WHEELS_REAR_OR_HYDRAULICS = 24, + VMT_PLTHOLDER = 25, + VMT_PLTVANITY = 26, + VMT_INTERIOR1 = 27, + VMT_INTERIOR2 = 28, + VMT_INTERIOR3 = 29, + VMT_INTERIOR4 = 30, + VMT_INTERIOR5 = 31, + VMT_SEATS = 32, + VMT_STEERING = 33, + VMT_KNOB = 34, + VMT_PLAQUE = 35, + VMT_ICE = 36, + VMT_TRUNK = 37, + VMT_HYDRO = 38, + VMT_ENGINEBAY1 = 39, + VMT_ENGINEBAY2 = 40, + VMT_ENGINEBAY3 = 41, + VMT_CHASSIS2 = 42, + VMT_CHASSIS3 = 43, + VMT_CHASSIS4 = 44, + VMT_CHASSIS5 = 45, + VMT_DOOR_L = 46, + VMT_DOOR_R = 47, + VMT_LIVERY_MOD = 48, + VMT_LIGHTBAR = 49, +}; ``` ## Parameters diff --git a/VEHICLE/SetVehicleNumberPlateText.md b/VEHICLE/SetVehicleNumberPlateText.md index 1c7c2731d..59aef84ee 100644 --- a/VEHICLE/SetVehicleNumberPlateText.md +++ b/VEHICLE/SetVehicleNumberPlateText.md @@ -8,16 +8,13 @@ ns: VEHICLE void SET_VEHICLE_NUMBER_PLATE_TEXT(Vehicle vehicle, char* plateText); ``` -``` -Sets a vehicle's license plate text. 8 chars maximum. -Example: -Ped playerPed = PLAYER::PLAYER_PED_ID(); -Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed); -char *plateText = "KING"; -VEHICLE::SET_VEHICLE_NUMBER_PLATE_TEXT(veh, plateText); -``` - ## Parameters -* **vehicle**: -* **plateText**: +* **vehicle**: The vehicle to set the plate for +* **plateText**: The text to set the plate to, 8 chars maximum +## Examples +```lua +local playerPed = PlayerPedId() +local vehicle = GetVehiclePedIsIn(playerPed) +SetVehicleNumberPlateText(vehicle, "KING") +``` diff --git a/VEHICLE/SetVehicleWheelType.md b/VEHICLE/SetVehicleWheelType.md index 6ba0c8910..dfcebc197 100644 --- a/VEHICLE/SetVehicleWheelType.md +++ b/VEHICLE/SetVehicleWheelType.md @@ -5,23 +5,11 @@ ns: VEHICLE ```c // 0x487EB21CC7295BA1 0x64BDAAAD -void SET_VEHICLE_WHEEL_TYPE(Vehicle vehicle, int WheelType); -``` - -``` -0: Sport -1: Muscle -2: Lowrider -3: SUV -4: Offroad -5: Tuner -6: Bike Wheels -7: High End -8: Benny's Wheels -9: Bespoke Wheels +void SET_VEHICLE_WHEEL_TYPE(Vehicle vehicle, int wheelType); ``` +Refer to [GET_VEHICLE_WHEEL_TYPE](#_0xB3ED1BFB4BE636DC) for wheel types. ## Parameters -* **vehicle**: -* **WheelType**: +* **vehicle**: +* **wheelType**: diff --git a/VEHICLE/ToggleVehicleMod.md b/VEHICLE/ToggleVehicleMod.md index ebcceccfe..722cc67b6 100644 --- a/VEHICLE/ToggleVehicleMod.md +++ b/VEHICLE/ToggleVehicleMod.md @@ -8,18 +8,9 @@ ns: VEHICLE void TOGGLE_VEHICLE_MOD(Vehicle vehicle, int modType, BOOL toggle); ``` -``` -Toggles: -UNK17 - 17 -Turbo - 18 -UNK19 - 19 -Tire Smoke - 20 -UNK21 - 21 -Xenon Headlights - 22 -``` ## Parameters * **vehicle**: -* **modType**: +* **modType**: Refer to eVehicleModType in [`SET_VEHICLE_MOD`](#_0x6AF0636DDEDCB6DD). * **toggle**: diff --git a/WEAPON/RemoveWeaponComponentFromWeaponObject.md b/WEAPON/RemoveWeaponComponentFromWeaponObject.md index 1b4cdddbb..d928662fd 100644 --- a/WEAPON/RemoveWeaponComponentFromWeaponObject.md +++ b/WEAPON/RemoveWeaponComponentFromWeaponObject.md @@ -5,11 +5,11 @@ ns: WEAPON ```c // 0xF7D82B0D66777611 0xA6E7ED3C -void REMOVE_WEAPON_COMPONENT_FROM_WEAPON_OBJECT(Any p0, Any p1); +void REMOVE_WEAPON_COMPONENT_FROM_WEAPON_OBJECT(Object weaponObject, cs_type(Any) Hash addonHash); ``` ## Parameters -* **p0**: -* **p1**: +* **weaponObject**: +* **addonHash**: diff --git a/ZONE/GetNameOfZone.md b/ZONE/GetNameOfZone.md index 0ae533bb4..35a92869a 100644 --- a/ZONE/GetNameOfZone.md +++ b/ZONE/GetNameOfZone.md @@ -98,6 +98,8 @@ WVINE = West Vinewood ZANCUDO = Zancudo River ZP_ORT = Port of South Los Santos ZQ_UAR = Davis Quartz +PROL = Prologue / North Yankton +ISHeist = Cayo Perico Island ``` ## Parameters