PauseClock does not freeze the time

Hi all,

I tried to freeze the clock by add resouce/fivem in AutoStartResources

resouce/fivem/fivem_client.lua

AddEventHandler('onClientMapStart', function()
	Citizen.Trace("ocms fivem\n")

    exports.spawnmanager:setAutoSpawn(true)
    exports.spawnmanager:forceRespawn()
    SetClockTime(24, 0, 0)
    PauseClock(true)
    Citizen.Trace("ocms fivem end\n")
end)

But the clock in game does not pause at (24, 0, 0).

Any idea?

thanks!

1 Like