Ui::applyShowHudComponentsThisFrameBatch

From RAGE Multiplayer Wiki
Revision as of 04:26, 25 April 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| Hides, shows, or resets component based on https://wiki.rage.mp/index.php?title=Ui::setShowHudComponentsThisFrameBatch setShowHudComponentsThisFrameBatch === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> mp.game.hud.applyShowHudComponentsThisFrameBatch(); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const hudComponents = { HUD_WANTED_STARS: 1, HUD_WEAPON_ICON: 2, HUD_...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Hides, shows, or resets component based on [setShowHudComponentsThisFrameBatch]

Return Value

  • void void

Syntax

mp.game.hud.applyShowHudComponentsThisFrameBatch();

Example

Client-Side
const hudComponents = {
    HUD_WANTED_STARS: 1,
    HUD_WEAPON_ICON: 2,
    HUD_CASH: 3,
    HUD_MP_CASH: 4
}


mp.game.hud.setShowHudComponentsThisFrameBatch(
    false, 
    [hudComponents.HUD_CASH, hudComponents.HUD_MP_CASH, hudComponents.HUD_WANTED_STARS, hudComponents.HUD_WEAPON_ICON]
);

mp.events.add('render', () => {
    mp.game.hud.applyShowHudComponentsThisFrameBatch()
});


See also

Template:Controls s function c