local active = false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('test', function()
active = not active
end)
while true do wait(0)
if active then
for k, v in pairs(getAllChars()) do
local px, py, pz = getCharCoordinates(v)
local ex, ey = convert3DCoordsToScreen(px,py,pz)
local x,y,z = getCharCoordinates(PLAYER_PED)
local wx,wy = convert3DCoordsToScreen(x,y,z)
renderDrawLine(wx,wy,ex,ey, 1, 0xFFFFFFFF)
end
end
end
end