Jump to content

HELP ! [showGUI]


FuriouZ

Recommended Posts

Hey i have problem :|

How i can make that if i hit market then it opens shopgui ?

Here is code(client):

function showGUI() 
guiSetVisible(Wnd,true) 
showCursor(true) 
end 
addEvent("showGUI",true) 
addEventHandler("showGUI", getRootElement(), showGUI) 
  

And(server):

shop = createMarker( 1541.7912597656,-1697.8956298828,12.5, "cylinder", 2, 255, 255, 255, 255 ) 
  
function showGUI(hitPlayer) 
triggerClientEvent (hitPlayer,"viewGUI",getRootElement(),hitPlayer) 
end 
addEventHandler("onMarkerHit",shop,viewGUI) 
  
addEvent ("viewGUI", true) 
function showGui (hitPlayer, matchingDimension) 
    triggerClientEvent ("viewGUI", hitPlayer) 
end 
addCommandHandler("shop",showGui) 
  

thanks

Link to comment

client

function showGUI() 
guiSetVisible(Wnd,true) 
showCursor(true) 
end 
addEvent("showGUI",true) 
addEventHandler("showGUI",getRootElement(),showGUI) 
  
addEvent("hideGUI",true) 
addEventHandler("hideGUI",getRootElement(), 
function () 
guiSetVisible(Wnd,false) 
showCursor (false) 
end) 

server

shop = createMarker( 1541.7912597656,-1697.8956298828,12.5, "cylinder", 2, 255, 255, 255, 255 ) 
  
function showGUI(hitPlayer) 
triggerClientEvent (hitPlayer,"showGUI",getRootElement(),hitPlayer)  
end 
addEventHandler ("onMarkerHit",shop,showGUI) 
  
addEventHandler("onMarkerLeave",shop, 
function (leavePlayer) 
triggerClientEvent(leavePlayer,"hideGUI",leavePlayer) 
end) 

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...