lol = {false,os.clock()}
function main()
while not isSampAvailable() do wait(0) end
lol[2] = os.clock()
while true do wait(0)
MYPOS = {getCharCoordinates(PLAYER_PED)}
local f,r = bringFloatTo((lol[1] and 3 or 0),(lol[1] and 0 or 3),lol[2],2)
if not r then
lol[2] = os.clock()
lol[1] = not lol[1]
end
drawCircleIn3d(MYPOS[1],MYPOS[2],MYPOS[3]-1.5,f,360,3,-1)
end
end
function bringFloatTo(from, to, start_time, duration)
local timer = os.clock() - start_time
if timer >= 0.00 and timer <= duration then
local count = timer / (duration / 100)
return from + (count * (to - from) / 100),true
end
return (timer > duration) and to or from,false
end
function drawCircleIn3d(x, y, z, radius, polygons,width,color)
local step = math.floor(360 / (polygons or 36))
local sX_old, sY_old
for angle = 0, 360, step do
local lX = radius * math.cos(math.rad(angle)) + x
local lY = radius * math.sin(math.rad(angle)) + y
local lZ = z
local _, sX, sY, sZ, _, _ = convert3DCoordsToScreenEx(lX, lY, lZ)
if sZ > 1 then
if sX_old and sY_old then
renderDrawLine(sX, sY, sX_old, sY_old, width, color)
end
sX_old, sY_old = sX, sY
end
end
end