OnHudVisibilityChange

From GT-MP
Jump to: navigation, search
OnHudVisibilityChange
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript


This event is triggered when the HUD was toggled by pressing F7.

Syntax

In Javascript
Client-Side Function

API.onHudVisibilityChange.connect((visible) => {

});
  • visible: parameter should be of bool type.

NOTE: This function returns data in IConnectedEvent type.

Usage example(s)

API.onHudVisibilityChange.connect((visible) => {
    if(visible) {
        // Show own server-HUD
    } else {
        // Hide own server-HUD
    }
});

References