TriggerNotifySystem
TriggerEvent Syntax
TriggerEvent("viority_hud:client:Notify", type, variant, header, desc, image, color, progressbaranim, duration)
PARAMETER
- Type (INT) -> Set type (1 = normal, 2 = announce)
- Variant (INT) -> Number of pre-defined variants (nil is not used)
- Header (STRING) -> The header e.g. "SERVER RESTART" or "EVENT NEWS"
- Desc (STRING) -> The description e.g. "The server will be restarted in X minutes!"
- Image (STRING) (OPTIONAL) -> Link or path to Icon Image
- Color (STRING) (OPTIONAL) -> Valid #HexCode
- ProgressAnim (BOOL) (OPTIONAL) -> ProgressbarAnim (Colors) true or false?
- Duration (INT) (OPTIONAL) -> The duration in ms (5000 = 5 seconds)
warning
Without pre-defined Variant
If you do not specify an OPTIONAL value, the general default value is used.
With pre-defined Variant
If you do not specify an OPTIONAL value, the pre-defined default value is used
Example without variant
-- Apply all Values
TriggerEvent("viority_hud:client:Notify", 2, nil, "SERVER RESTART", "The server will be restarted in 5 minutes!", "https://example.com/Icon.png", "#0071f3", true, 5000)
-- Apply only required values (OPTIONAL Values will be default)
TriggerEvent("viority_hud:client:Notify", 2, nil, "SERVER RESTART", "The server will be restarted in 5 minutes!")
-- Apply only required values but with duration (Color and ProgressAnim will be default)
TriggerEvent("viority_hud:client:Notify", 2, nil, "SERVER RESTART", "The server will be restarted in 5 minutes!", nil, nil, nil, 5000)
Example with variant
-- Apply all Values
TriggerEvent("viority_hud:client:Notify", 2, 1, "SERVER RESTART", "The server will be restarted in 5 minutes!", "https://example.com/Icon.png", "#0071f3", true, 5000)
-- Apply only required values (OPTIONAL Values will be variant default)
TriggerEvent("viority_hud:client:Notify", 2, 1, "SERVER RESTART", "The server will be restarted in 5 minutes!")
-- Apply only required values but with duration (Color and ProgressAnim will be variant default)
TriggerEvent("viority_hud:client:Notify", 2, 1, "SERVER RESTART", "The server will be restarted in 5 minutes!", nil, nil, nil, 5000)