SetWeaponFlags: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} ==Syntax== <syntaxhighlight lang="lua">bool setWeaponFlags ( theWeapon, string theFlag, value TheValue )</syntaxhighlight> ===Required Arguments=== * '''theWeapon:''' the we...") |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
Set a custom weapons flags. | |||
==Syntax== | ==Syntax== |
Revision as of 23:30, 25 August 2012
Set a custom weapons flags.
Syntax
bool setWeaponFlags ( theWeapon, string theFlag, value TheValue )
Required Arguments
- theWeapon: the weapon to set the flag of
- theFlag: the weapon flag to set:
- bool disable_model disable the weapon model of the weapon
- flags edit the processLineOfSight flags used to find the hit position
- bool checkBuildings
- bool checkCarTires
- bool checkDummies
- bool checkObjects
- bool checkPeds
- bool checkVehicles
- bool checkSeeThroughStuff
- bool checkShootThroughStuff
- bool instant_reload reload the weapon instantly rather than doing a reload
- bool shoot_if_out_of_range shoot the target position if out of weapon range
- bool shoot_if_blocked shoot the target position if blocked
- theValue: the value to set
Returns
Returns true on success (flags have 8 values), false otherwise.
Requirements
This template will be deleted.
See Also
- Shared
- getWeaponProperty
- getPickupWeapon
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- setWeaponAmmo
- setWeaponProperty
sets the flags of the weapon ( used to determine what to hit )