-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify usage for weapon capacity natives
This PR renames the weapon capacity natives to match the original names and also clarifies where these weapon indexes are meant to be found.
- Loading branch information
1 parent
9690545
commit bd5e91f
Showing
4 changed files
with
47 additions
and
34 deletions.
There are no files selected for viewing
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,18 @@ | ||
--- | ||
ns: VEHICLE | ||
aliases: ["0x8181CE2F25CB9BB7", "_GET_VEHICLE_WEAPON_CAPACITY"] | ||
--- | ||
## GET_VEHICLE_WEAPON_RESTRICTED_AMMO | ||
|
||
```c | ||
// 0x8181CE2F25CB9BB7 | ||
int GET_VEHICLE_WEAPON_RESTRICTED_AMMO(Vehicle vehicle, int weaponIndex); | ||
``` | ||
## Parameters | ||
* **vehicle**: The vehicle handle | ||
* **weaponIndex**: The weapon index we're getting ammo for (see [SET_VEHICLE_WEAPON_RESTRICTED_AMMO](#_0x44CD1F493DB2A0A6) for information on how to access these slots). | ||
## Return value | ||
Gets the current restricted ammo count for a particular vehicle weapon index on a vehicle. |
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,29 @@ | ||
--- | ||
ns: VEHICLE | ||
aliases: ["0x44CD1F493DB2A0A6", "_SET_VEHICLE_WEAPON_CAPACITY"] | ||
--- | ||
## SET_VEHICLE_WEAPON_RESTRICTED_AMMO | ||
|
||
```c | ||
// 0x44CD1F493DB2A0A6 | ||
void SET_VEHICLE_WEAPON_RESTRICTED_AMMO(Vehicle vehicle, int weaponIndex, int ammoCount); | ||
``` | ||
Sets a limited number of ammo for a particular vehicle weapon index on a vehicle. | ||
Information about weapon indexes can be found in `handling.meta`. | ||
In the example given below, `uWeaponHash` defines weapon hashes for the vehicle. Each `<Item>` corresponds to an index starting from `0`. | ||
``` | ||
<uWeaponHash> | ||
<Item>VEHICLE_WEAPON_PLAYER_BUZZARD</Item> <!-- Index: 0 --> | ||
<Item>VEHICLE_WEAPON_SPACE_ROCKET</Item> <!-- Index: 1 --> | ||
<Item>VEHICLE_WEAPON_SEARCHLIGHT</Item> <!-- Index: 2 --> | ||
</uWeaponHash> | ||
``` | ||
## Parameters | ||
* **vehicle**: The vehicle handle | ||
* **weaponIndex**: The weapon index we're setting ammo for (between `0` and `3`), see description for more. | ||
* **ammoCount**: When set positive, will count down with every fire and prevent firing at `0`. Set `-1` to disable restricted ammo. | ||