local render228 = "{4C6ADD}[ЗНАЧЕНИЕ] {FFFFFF}"
worked = not worked
worked = false
function main()
while not isSampAvailable() do wait(0) end
local font = renderCreateFont("Cambria Regular", 7, 7)
sampRegisterChatCommand("render228", function()
worked = not worked
if worked then
sampAddChatMessage("{4C6ADD}[RENDER228] {FFFFFF} Включено!", -1)
else
sampAddChatMessage("{4C6ADD}[RENDER228] {FFFFFF} Выключено!", -1)
end
end)
while true do
wait(0)
if worked 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 > 0.5 then
local wposX, wposY = convert3DCoordsToScreen(vposX, vposY, vposZ)
renderFontDrawText(font, render228 .. string, wposX, wposY, color)
end
end
end
end
end
end