Ищу скрипт, который показывает что открыта машина или нет, в виде 3d текста

Статус
В этой теме нельзя размещать новые ответы.

jdmwick

Новичок
Автор темы
7
0
Где-то скрипт сделал вообщем, там показано было зелёным что авто открыто, а красным закрыта, прям на модельке машины, вот ищу такой.
 
Решение
Держи, команда активации/деактивации - /showdoor, работает в радиусе 20 метров.
Lua:
script_name('ShowDoor')
script_author('Bredd Lane')

require 'lib.moonloader'

font = renderCreateFont('Arial', 7, 13)
act = false

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage('{3660E9}[ShowDoor]{FFFFFF} Загружен! Команда - /showdoor',-1)
    sampRegisterChatCommand('showdoor',function ()
        act = not act
    end)
    lua_thread.create(render)
    while true do
        wait(0)
    end
end

function render()
    while true do wait(0)
        if not isPauseMenuActive() then
            if act and sampGetGamestate() == 3 and not newdlact then...

Bredd Lane

Известный
423
348
Держи, команда активации/деактивации - /showdoor, работает в радиусе 20 метров.
Lua:
script_name('ShowDoor')
script_author('Bredd Lane')

require 'lib.moonloader'

font = renderCreateFont('Arial', 7, 13)
act = false

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage('{3660E9}[ShowDoor]{FFFFFF} Загружен! Команда - /showdoor',-1)
    sampRegisterChatCommand('showdoor',function ()
        act = not act
    end)
    lua_thread.create(render)
    while true do
        wait(0)
    end
end

function render()
    while true do wait(0)
        if not isPauseMenuActive() then
            if act and sampGetGamestate() == 3 and not newdlact then
                for k,v in pairs(getAllVehicles()) do
                    local x,y,z = getCarCoordinates(v)
                    local positionX, positionY, positionZ = getCharCoordinates(PLAYER_PED)
                    local carbool, carid = sampGetVehicleIdByCarHandle(v)
                    local DoorsStats = getCarDoorLockStatus(v)
                    local wposX, wposY = convert3DCoordsToScreen(x,y,z)
                    local statusstr = ''
                    if DoorsStats == 0 then
                        statusstr = '{00FF00}Открыто'
                    elseif DoorsStats == 2 then
                        statusstr = '{FF0000}Закрыто'
                    end
                    local dist = getDistanceBetweenCoords3d(positionX, positionY, positionZ,x,y,z)
                    if isPointOnScreen(x,y,z,0) and dist < 20 then
                        renderFontDrawText(font,statusstr,wposX,wposY,-255878787)
                    end
                end
            end
        end
    end
end
 

Вложения

  • ShowDoor.lua
    1.7 KB · Просмотры: 44
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.