[FREE] [ESX] Advanced Green Zones

lation_greenzones - A greenzones script to create controlled areas on the map for FiveM

Preview: https://streamable.com/nat0ce
Download: https://github.com/IamLation/lation_greenzones

What is it?

A greenzones script to create controlled areas on the map for FiveM with many features. You can create persistent greenzones that exist all the time for areas like Hopitals, Police Stations, etc and completely customize them individually so each zone has it’s own settings. Furthermore you can create (and delete) temporary greenzones on-the-fly while in-game via the /setzone & /clearzone commands with tons of features and customizability there too!

Persistent Greenzone Features:

  • Create custom greenzones via the config (for places like hospitals, police stations, etc) that exists all the time
  • Configure and customize each and every persistent greenzone independently (each zone has its own settings)
  • Enable/disable player & vehicle collisions per zone
  • Enable/disable enforcing speed limits per zone
  • Enable/disable removing weapons from players hand upon entering
  • Enable/disable everyone from firing weapons/punching/etc while within zone
  • Enable/disable invincibility for everyone while within zone
  • Enable/disable displaying an ox_lib showTextUI within zone
  • Customize the text, color, icon, position, etc for the showTextUI per zone
  • Enable/disable displaying a blip for your greenzone on the map
  • Fully configure the blip (choose a radius or normal blip, or both)
  • Customize name, sprite, color, scale, transparency, etc of the blip

Temporary (in-game) Greenzone Features

  • Create a temporary greenzone at anytime via /setzone
  • Customize the map blip (name, sprite, color, size)
  • Set any text to display on-screen via ox_lib’s showTextUI
  • Set the color & position for the textUI
  • Customize the greenzone size (1-100)
  • Enable/disable players from firing weapons/punching/etc within zone
  • Enable/disable invincibility for everyone while within zone
  • Set a custom speed limit for the zone if desired
  • Clear the zone anytime with the /clearzone command
7 Likes

very nice Script

1 Like

Thanks, enjoy!

Awesome script!

1 Like

Thank you, enjoy!

1 Like

I have an issue where players are unable to mellee/punch after leaving a zone…

1 Like

Interesting, okay - can you join the Discord so I can debug with you further more easily?

Good job!

Disable gun equip, people equip and then do /th or /takehostage then kill player or drag player out of zone.

Interesting, thanks for letting me know. I’ll see what I can do.

Very good script, exellent job , i love it and use it on my server , have just 1 question :
image
when i enter a greenzone i am like that , what i have to config to not be like that ?
thanks in advance

Hey, glad to hear! In the config set disablePlayerVehicleCollision = false :slight_smile:

2 Likes

bro im having trouble… i tried to create persistent one… as soon as i do the script stop as a whole… and i cant create temp with /setzone… says command ‘setzone’ failed to execute @lation_greenzones/server/main.lua:6: attempt to index a nil value (global ‘ESX’)

Hey man, what framework are you on?

How to create the zone, in the preview it doesnt say?

Either by creating a zone in the config (persistent) & follow the existing zones examples (and all the comments) or with the command /setzone for a temporary zone