- Версия MoonLoader
- .026-beta
Как сделать автооткрытие дверей? (imgui)
Нашел такое но оно не работает у меня
Нашел такое но оно не работает у меня
Код:
local check_box = imgui.ImBool(false)
if imgui.Checkbox(u8'Автооткрытие двери', check_box) then
if opengate_timer == nil or (os.clock() - opengate_timer) >= 0.5 then
local pX, pY, pZ = getCharCoordinates(PLAYER_PED)
for id = 0, 2047 do
if sampIs3dTextDefined(id) then
local text, _, x, y, z, _, _, _, _ = sampGet3dTextInfoById(id)
if string.match(text, "^{%x+}Открыть\n\n{%x+}H$") then
if getDistanceBetweenCoords2d(pX, pY, x, y) <= 1 then
sampSendChat("/n ti nol")
opengate_timer = os.clock()
end
end
end
end
end
end