Player::isSpecialAbilityActive
Description
This function checks if the player’s special ability is currently active. Special abilities are unique powers available in single-player modes, such as invincibility or increased accuracy. While these abilities may not have full functionality in RageMP, this function can be used to detect whether any such state is active, which could be helpful for custom mechanics or game events.
Required Params
- None
Return value
- 'boolean' - Returns
trueif the player's special ability is active, otherwisefalse.
Syntax
mp.game.player.isSpecialAbilityActive();
Example
This example checks the special ability's status and logs it to the console:
const isActive = mp.game.player.isSpecialAbilityActive();
mp.gui.chat.push(`Special ability active: ${isActive}`);