help me

Runbu73

Участник
Автор темы
75
2
function main() while not isSampAvailable() do wait(100) end sampRegisterChatCommand("fire", function() if isCharInAnyCar(playerPed) then startCarFire(storeCarCharIsInNoSave(playerPed)) end end) wait(-1) end

How can I transfer this to imgui.button and make it functional?

Ícone Verificada pela comunidade
 

MLycoris

Режим чтения
Проверенный
1,826
1,867
??
Lua:
if imgui.Button('Start Fire') then
    if isCharInAnyCar(1) then
        startCarFire(storeCarCharIsInNoSave(1))
    else sampAddChatMessage('Error',-1)
    end
end