Jump to content

Is there any gui window creator ?


Recommended Posts

Server Sided: https://wiki.multitheftauto.com/wiki/OnMarkerHit

Client Sided: https://wiki.multitheftauto.com/wiki/OnClientMarkerHit

an example:

myGuiWindow = guiCreateWindow ()  
myMarker = createMarker () 
  
addEventHandler ( "onClientMarkerHit", root, 
    function ( hitElement ) 
        if ( source == myMarker and hitElement == localPlayer ) then 
         guiSetVisible ( myGuiWindow, true ) 
        end 
    end 
) 

Link to comment

this is a simple

addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
    guitestwindow = guiCreateWindow(0.6837,0,0.315,0.9983,"windowname",true) 
    end 
) 
  
function guiopenclose () 
    local IsWindowVisible = guiGetVisible(guitestwindow) 
    if (IsWindowVisible == true) then    
        guiSetVisible(guitestwindow, false) 
        guiSetInputEnabled(false) 
        showCursor(false) 
    end 
    if (IsWindowVisible == false) then 
        guiSetVisible(guitestwindow, true)       
        showCursor(true) 
    end 
end 
  
bindKey("F7", "down", guiopenclose) 
addCommandHandler("opengui", guiopenclose)   

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...