Skip to Content

Client guide

Functions in the client part of functions.lua.

FunctionWhat it does
Gui.Notificar(texto, tipo)Shows a notice on the client.
Gui.Reviver(ped, coords)Revives the player on respawn and on exit.
Gui.GuardarArmas() / Gui.DevolverArmas()Weapons on entry and exit.
Gui.PausarClimaBase(pausar, hora, clima)Pauses your weather script.
Gui.AoEntrarNaPurga() / Gui.AoSairDaPurga()Run when the player enters and leaves the night.
Gui.CorridaLigar(ligar)Running and stamina during the night.

Ambulance and death

  1. Put the client event that revives the player in Config.eventosReviver:
    config.lua
    Config.eventosReviver = { "my_ambulance:revive" }
  2. If your ambulance shows its screen over the night’s death screen, turn that screen off inside Gui.AoEntrarNaPurga() and back on in Gui.AoSairDaPurga().
functions.lua
function Gui.AoEntrarNaPurga() -- example: exports["my_ambulance"]:DisableScreen(true) end function Gui.AoSairDaPurga() -- example: exports["my_ambulance"]:DisableScreen(false) end

Weather

The red sky and night time apply only to players in the night. If your weather script keeps changing the time, pause it in Gui.PausarClimaBase(pausar). cd_easytime and qb-weathersync are already handled.