script_author("MrCold")
script_name("[ARZ]WH on bookmark")
script_version('v0.01')
local tag = "{9826F7}[MrCold]{FFFFFF}"
activated = false
function main()
while not isSampAvailable() do wait(0) end
local font = renderCreateFont("Courier New", 9, 7)
sampRegisterChatCommand("bookmark", function()
activated = not activated
if activated then
sampAddChatMessage("vh on", 0xFFFFFF)
else
sampAddChatMessage("vh off", 0xFFFFFF)
end
end)
while true do
wait(0)
if activated then
for a = 1, 2048 do
if sampIs3dTextDefined(a) then
local string, color, vposX, vposY, vposZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(a)
local X, Y, Z = getCharCoordinates(PLAYER_PED)
local distances = getDistanceBetweenCoords2d(vposX, vposY, X, Y)
if isPointOnScreen(vposX, vposY, vposZ, 0.0) and string.find(string, "Закладка") and distances > 4.0 then
local wposX, wposY = convert3DCoordsToScreen(vposX, vposY, vposZ)
renderFontDrawText(font, tag .. string, wposX, wposY, color)
end
end
end
end
end
end