Jump to content

help


golanu21

Recommended Posts

how i make that : i make a marker, and when the localplayer enter in the marker1(example), to show a gui.. (this i know) but, when his press a button on the window, the marker remove only for the localplayer...(this i don't know)

Use this functions to create marker hit:

createMarker 
triggerClientEvent 
addEventHandler("onPlayerMarkerHit", getRootElement(), func) 

and this for your Cancel button

function closeGUI() 
    if (source == cancelButton) then 
        showCursor(false) 
        guiSetVisible( Window, false ) 
    end 
end 
addEventHandler("onClientGUIClick",root,closeGUI) 

Edited by Guest
Link to comment

That's quite logical, because the marker is created in every client's game individually.

Make the marker server sided and after clicking the button use triggerServerEvent to destroy the marker.

In this case it's maybe better to use server side onMarkerHit and triggerClientEvent to show the gui.

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