Skip to content

icecubepiso/interaction-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

interaction-menu

Simple interaction notify nopixel inspired

For show notification use this export:

exports['interaction-menu']:ShowInteraction('show', 'green', "[E] Otevřít banku")

or

TriggerEvent('interaction-menu:ShowInteraction', 'show', 'green', '[E] Otevřít banku")

For close notification use this:

exports['interaction-menu']:HideInteraction()

or

TriggerEvent('interaction-menu:HideInteraction')

Example:

    local alreadyEnteredZone = false
    while true do
        local sleep = 200
        local ped = PlayerPedId()
        local inZone = false
        local dist = #(GetEntityCoords(ped)-vector3(0,0,0))
        if dist <= 5.0 then
            sleep = 0
            inZone  = true

            if IsControlJustReleased(0, 38) then
                TriggerEvent('ph:LanaRhoades') -- just your event here :D
            end
        end
        
        if inZone and not alreadyEnteredZone then
            alreadyEnteredZone = true
            exports['interaction-menu']:ShowInteraction('show', 'green', "[E] Otevřít banku")
        end

        if not inZone and alreadyEnteredZone then
            alreadyEnteredZone = false
            exports['interaction-menu']:HideInteraction()
        end
        Wait(sleep)
    end
end)

About

Simple interaction notify nopixel inspired

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published