Server Cooldown for Robberies

So basically I’m trying to get a script that allows a server cooldown on robberies. So when a robbery is taking place it will alert everyone on the server that a robbery is currently in progress and that there will be a cooldown before the next robbery can take place. I just want to create better RP for my officers , when there’s only 3 in town in a struggle with 5 robberies in 20 min. Any help will be appreciated

I’m trying to do the same with esx_mugging, You can create a boolean variable.

Example: (local canRob=true)
When a robbery starts, set canRob to false, and put the robbery function inside and if that checks if canRob is true.

But I need to create a timer that set the variable to true after 30 minutes past.

Hope it helps :frowning:

Would that be announced to the server then?