IsWeaponRenderEnabled

From Multi Theft Auto: Wiki
Revision as of 10:59, 4 January 2025 by Srslyyyy (talk | contribs) (Add isWeaponRenderEnabled by FileEX (https://github.com/multitheftauto/mtasa-blue/pull/3917))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r22880:
This function allows you to check whether GTA weapon rendering is enabled for ped, player.

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