[Release] Safe Zone(s) Updated 9/10/18

how can i let polices to take out weapon everywhere?

Do you make it please ?

how do i take out the blue circle?

You need to change the opacity of the blue circle. It’s a set of numbers and you want to change it to 0. You could try 20 so it’s still visible but not much

Hey i have a problem i put the script in my FiveM Server but i dont know how to use/ open the menu for the Safezone can somebody help?

there is no menu. you add coordinates to the client.lua

You need pNotify

@davewazere Waow Amazing Job

does this work for esx

I honestly have no idea, it shouldnt be dependent on any framework(esx/vrp) You would just have to try it. Havent been updated since 2018 brother lol

Hi, i installed the safezone, and everything is working great, thank you!
But i have a question, how i can setting to POLICE, EMS AND MECHANIC use weapon and punch in safezone?

where would i go to remove the blips off the map? i dont see anything in config about removing blips off the map but i can remove the circles from plain view though.

Mine is more of a oval. is it a way i can make it round like a circle?

Hey everyone, as of 7:58PM New Zealand standard time, July 27th 2021, I can confirm that this resource still works and I use it alongside pNotify.

1 Like

From the script itself:

--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
-------                              Creating Blips at the locations. 							--------------
-------You can comment out this section if you dont want any blips showing the zones on the map.--------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

Citizen.CreateThread(function()
	while not NetworkIsPlayerActive(PlayerId()) do
		Citizen.Wait(0)
	end
	
	for i = 1, #zones, 1 do
		local szBlip = AddBlipForCoord(zones[i].x, zones[i].y, zones[i].z)
		SetBlipAsShortRange(szBlip, true)
		SetBlipColour(szBlip, 2)  --Change the blip color: https://gtaforums.com/topic/864881-all-blip-color-ids-pictured/
		SetBlipSprite(szBlip, 398) -- Change the blip itself: https://marekkraus.sk/gtav/blips/list.html
		BeginTextCommandSetBlipName("STRING")
		AddTextComponentString("SAFE ZONE") -- What it will say when you hover over the blip on your map.
		EndTextCommandSetBlipName(szBlip)
	end
end)

Can confirm this still works, I am getting back into FiveM coding again, so I will try and help people as much as I can with my stuff

you need to change both the x and y SCALE values of the marker. the Z value is the height.

you need to look at both of these lines and figure out which value is the X and Y and change them accordingly. Also if you want a circle then you have to set them the same. I.e. if you put 50 for X, then Y has to be 50 as well

-- 	DrawMarker(1, zones[closestZone].x, zones[closestZone].y, zones[closestZone].z-1.0001, 0, 0, 0, 0, 0, 0, 100.0, 100.0, 2.0, 13, 232, 255, 155, 0, 0, 2, 0, 0, 0, 0) -- heres what all these numbers are. Honestly you dont really need to mess with any other than what isnt 0.
--DrawMarker(type, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ, int red, int green, int blue, int alpha, BOOL bobUpAndDown, BOOL faceCamera, int p19(LEAVE AS 2), BOOL rotate, char* textureDict, char* textureName, BOOL drawOnEnts)
1 Like

You would need to add an exception to the code basically.

so something along the lines of using “GetPlayerIdentifiers”

then add it to the code before anything saying something like


local excluded = {steam:00000, steam:000000, steam:00000}
local player = GetPlayerIdentifiers(Source)[1]


if has_value(excluded, player) then
 end
elseif not excluded then

the rest of code

end


very basic, prolly not right, I just got back into this but I will try and work on something like this

Can’t set radius PER safe zone xyz?

it is not working anymore i get safe zone in all the map is the re a way to fix this?

does this work with esx?