Gameplay::setBit: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
Line 12: Line 12:
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Gameplay_s_function_c}}
{{Gameplay_functions_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 10:02, 22 July 2024

This sets bit [offset] of [address] to on.

The offsets used are different bits to be toggled on and off, typically there is only one address used in a script.

Example:
GAMEPLAY::SET_BIT(&bitAddress, 1);

To check if this bit has been enabled:
GAMEPLAY::IS_BIT_SET(bitAddress, 1); // will return 1 afterwards

Please note, this method may assign a value to [address] when used.

Syntax

mp.game.gameplay.setBit(address, offset);

Required Arguments

  • address: int
  • offset: int

Return value

  • int

Example

// todo

See also