zSafeZones (FiveM Safe Zone script!)

Second Script!!! Welcome to zSafeZones! Before we start. This was the code I used for the text Holograms-Floating-Text This is made for my server and It seemed to work okay. There are obviously ways to abuse this from players and I’m aware. Just a fun little project! Check it out on github!

zSafeZones Download! (CLICK ME)

  • Added fxmanifest.lua
  • Removed un-needed code.
2 Likes

So, I’ve seen in your past couple of resources that you are doing some stuff that can be improved.

  1. Change to fxmanifest. __resource.lua is deprecated.
  2. I’m not sure why you have this.
  3. AFAIK, this native this a z coord too.
  4. Not sure why this if statement is needed.
  5. Use math instead of the native in here. Example: #(vector3 - vector3).
  6. This is not being used either.
  7. You’re constantly drawing text even if someone is far. I recommend only drawing text if player is close. Apart from that, I believe you can just do cfg.txttop\ncfg.txtmid\ncfg.txtbtm instead of drawing 3 times.
  8. Fix the indentation kek.
1 Like

GetEntityCoords(GetPlayerPed(-1))) < 10.0 then this is the distance check. I believe im just tired and add stuff to my scripts that just…aren’t needed. so thanks <3

1 Like

Fixed all issues except 3, 5, and 7…Cause 7 isn’t drawing text every frame even far from it. Its drawing it in distance.

1 Like

what is the safezone for?

Anything you want! Could be a place for players to go ooc, AFK, or just a zone where people cant shoot in.

1 Like

because i would need a safezone script where people are invincible inside it and be able to make a custom radius for each zone. the zones also should have a marker on the map

Unfortunatley I have not found a perfect way to make players invincible in the zone but you cant shoot in the zone. I will update to make multiple zones and they each have a marker.

So people could kill people from outside even they are inside the safezone?

you could pair this script up with SimplePassive and use the export whenever a player enters a zone

Yes. I still again. Cannot find a way to make it the way it should, But im working for it.

1 Like

if anything Id make the code local to my file. Its too much of a hassle for people to include a new script just for mine to work. Ill look into it.

2 Likes