IsWeaponRenderEnabled: Difference between revisions
Jump to navigation
Jump to search
(Add isWeaponRenderEnabled by FileEX (https://github.com/multitheftauto/mtasa-blue/pull/3917)) |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{New feature/item|3.0161|1.6.0|22880|This function | {{New feature/item|3.0161|1.6.0|22880|This function checks whether GTA weapon rendering is enabled for [[ped]], [[player]].}} | ||
==Syntax== | ==Syntax== |
Revision as of 13:01, 5 January 2025
Syntax
bool isWeaponRenderEnabled ( )
Returns
Returns true if weapon rendering is enabled, otherwise returns false.
Example
This example allows you to disable/enable weapon rendering by using /weaponrender command.
function toggleWeaponRender() local weaponRenderEnabled = isWeaponRenderEnabled() local weaponRenderNewState = (not weaponRenderEnabled) setWeaponRenderEnabled(weaponRenderNewState) end addCommandHandler("weaponrender", toggleWeaponRender)
See Also
- Shared
- getWeaponProperty
- getPickupWeapon
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- setWeaponAmmo
- setWeaponProperty