Difference between Citizen.Wait and Wait

Hi,

Well, all is in the title: why using Citizen.Wait() or Wait()?

Thanks

A ‘wait function’ pauses the current thread for a specified time. Citizen.Wait() pauses the thread you have instantiated previously (with Citizen.CreateThread()). Wait() will pause more than your thread and might pause the whole script, resource or plugin. I have not tested to see “how far” Wait() will reach.

2 Likes

Very interesting thank you!

Both are equivalent in the context of Lua scripting in Cfx.

3 Likes