[FREE][ESX] Advanced Peacetime script | (Optimized, Highly customizable)

Advanced Peacetime script

DOWNLOAD

DOCUMENTATION

TEBEX

DISCORD

B
Code is accessible Yes
Subscription-based No
Support Yes

Free releases: Releases that are released for free must contain a download other than Tebex (such as a direct download or GitHub). You may include a Tebex link but it must not be the only download.

My bad, updated

Hi, please note that you don’t need to use AddEventHandler after RegisterNetEvent, so all the :

RegisterNetEvent('wonder_pt:enabled')
AddEventHandler('wonder_pt:enabled', function()
-- do your stuff
end)

-- Can be changed to : 

RegisterNetEvent('wonder_pt:enabled', function()
-- do your stuff
end)

Also, instead of your loops to check any change in the GlobalState, I suggest listening to changes using this native : AddStateBagChangeHandler - FiveM Natives @ Cfx.re Docs

1 Like

Thanks for your knowledge. Should be implemented by now.

change the thread where u count the cops with playerconnected and disconenct event and count it like that

playerconnected would not work with multichar

1 Like