Skip to main content

Player::isSpecialAbilityActive

Client-side function

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 true if the player's special ability is active, otherwise false.

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}`);