alt.getConfigFlag
Used to get the current value of a configuration flag which is used to determine whether or not it is currently enabled.
Valid Flags
DISABLE_AUTO_WEAPON_SWAP
DISABLE_PED_PROP_KNOCK_OFF
Returns a boolean
(true / false)
Declaration
alt.getConfigFlag(flag: string): boolean
Usage
const result = alt.getConfigFlag('DISABLE_AUTO_WEAPON_SWAP');
Real World Example
const isEnabled = alt.getConfigFlag('DISABLE_AUTO_WEAPON_SWAP');
if (isEnabled) {
alt.log('Disabling weapon swap is currently enabled.');
}
These examples assume you have imported alt
from alt-client
.