ost = false
function main()
while not isSampAvailable() do wait(7000) end
sampAddChatMessage("{FFFF00}[Test]{FFFFFF} успешно загружен! Активация/деактивация: {FF0000}/one", -1)
sampAddChatMessage("{FFFF00}[test]{FFFFFF} by {00AAAA}sakata", -1)
font = renderCreateFont("MENU", 7, 5)
sampRegisterChatCommand("cwh", function()
ost = not ost
printString("Test"..(ost and "ON!" or "OFF!"), 1000)
end)
while true do wait(0)
if ost then
for i = 0, 2048 do
if sampIs3dTextDefined(i) then
local st, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(i)
if isPointOnScreen(posX, posY, posZ, 1) then
local x, y, z = getCharCoordinates(1)
local xx, yy = convert3DCoordsToScreen(x, y, z)
local px, py = convert3DCoordsToScreen(posX, posY, posZ)
if st:find("Осталось") then
renderDrawLine(xx, yy, px, py, 4, 0xffff00c9)
renderFontDrawText(font, "Осталось (%d+)", px, py, 0xffff00c9)
end
end
end
end
end
end
end