Trying to work out or “see” how big a certian radius is in-game for a script that removes certain props. Im trying to find how big a “20” or “50” sized radius is?
local pos = vector3(x,y,z) -- center
local radius = 20.0
DrawMarker(25, pos, -1, 0.0, 0.0, 0, 0.0, 0.0, radius, radius, 1.0, 0, 162, 250, 80, true, true, 2, 0, 0, 0, 0)
This should render a marker for you, with the desired radius. This way you can visualize
Hmm not working, is that simply a client.lua or server.lua?
Either way im not getting anything visually, but then im not sure if it’s something that is around my player or on a fixed GPS location?
This is something I typed just in here. You have to use it in client.
When vector is not working use x,y,z directly.
Citizen.CreateThread(function()
local radius = 20.0
DrawMarker(1, x, y, z, 0, 0, 0, 0, 0, 0, radius, radius, 2.0, 13, 232, 255, 155, 0, 0, 2, 0, 0, 0, 0)
end)
Thanks, so im not too good with LUA/Native stuff other then changing a few values etc, i’ve put that into a client.lua and still not showing up? I’ve also set the XYZ to GPS and nothing either?
You need to call it in a loop.
Citizen.CreateThread(function()
local radius = 20.0
while (true) do
DrawMarker(1, x, y, z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, radius, radius, radius, 255, 55, 55, 200, false, false, 2, false, nil, nil, false)
Citizen.Wait(0)
end
end)