HUD
This page describes the HUD API
Fadeout
hudFadeout(player, int, int, int)
Fades the screen to a specified color with a duration.
oak.event('playerConnect', async pid => {
    console.log('[info] player connected', pid)
    // Cause a white blink effect
    oak.hudFadeout(pid, 1, 0.5, 0xFFFFFF)
    oak.hudFadeout(pid, 0, 0.5, 0xFFFFFF)
    oak.playerPositionSet(pid, [-1774.59301758, -4.88487052917, -2.40491962433])
    oak.playerHealthSet(pid, 200)
    oak.playerSpawn(pid)
})Countdown
hudCountdown(player, int)
Displays a race countdown number.
// TODOAnnounce
hudAnnounce(player, string, int)
Displays a splash/alert message in the centre of the screen.
// TODOMessage
hudMessage(player, string, int)
Displays a message in the left bottom corner of the screen.
Last updated
Was this helpful?
