EDIT: Redzones should work properly again! Let me know if something is broken.
IF IT DOES NOT WORK COMMENT OUT THE MYTHIC NOTIFY EXPORTS!
Hi there!
I would like to start off by saying this is my 3rd script (1st release however!) and it is not really optimized. (Update: It is optimized now! Read to the end!) I have been learning how to code recently and am enjoying it loads. Maybe this script is useful for someone
So what does this script do?
It adds the following things:
-
It adds redzones which are visible on the (mini)map and ingame with a red sphere around the configured coordinates.
-
It adds greenzones which make it so anyone inside is immune to damage from other players, other players vehicles, etc. This is set back to normal once said person leaves the greenzone. (Basically means you cannot be shot nor VDMād in a greenzone)
-
It adds a speed limiter for greenzones. So the moment someone enters a greenzone with a vehicle, you can set the maximum speed for inside the greenzone
-
It adds a āglobalā speed limiter which allows you to set the maximum speed of someone outside any greenzone.
Now this script is almost standalone, you do not require any frameworks for it to work, however we have decided we want to include the mythic notifications possibility. If you do not wish to use mythic notifications you can safely just delete those lines!
You are allowed to edit my scripts to your liking, however if you wish to publish it please link this release in your post!
I will try to provide āsupportā to the best of my abilities, however please understand I have only been into coding for 2 weeks! Any tips therefore are more than welcome seeing I would like to improve my ācodingā skills.
Also make sure to read the README file.
If you wish to use mythic_notify please download it here if you havent already:https://github.com/JayMontana36/mythic_notify
Download the multi_zones resource here:
https://github.com/Apex0909/multi_zones-by-Apex
Preview: FiveM | Standalone Redzone & Greenzone script! | Apex - YouTube
Thank you!
Apex
(Please let me know if I missed anything! Some parts of the code is Dutch, while some is English. This is because we werent sure if we were ever going to release it and there was no point in doing it all in English if we werent seeing me and my friend are Dutch! But it should still be fairly understandable )
Update: Thank you @Yoakz for optimizing and adding a config file!