Wei Posted April 24, 2012 Posted April 24, 2012 I don't know the difrence of source, localplayer, client, root, getRootElement(), thePlayer... function gaga(source) triggerClientEvent("guievent", source) end addEventHandler("onMarkerHit",policemarker, gaga) addEvent("guievent", true) function mama( localPlayer ) guiSetVisible(window, true) showCursor ( true ) end addEventHandler("guievent", getRootElement(), mama) Diet with russian vodka, lose 3 days in one week !
Scooby Posted April 24, 2012 Posted April 24, 2012 soure is the source of the event... so onMarkerHit, if u want it to work for a player, use something like: function gaga(source, dim) -- source is the element that hit the marker (could be any element (car/player/object) if getElementType(source) == "player" and dim then -- if element that hit the marker is a player and if the player is in the same dimension as the marker then... triggerClientEvent(source,"guievent", source) -- trigger the client event 'guievent' end addEventHandler("onMarkerHit",policemarker, gaga) now in ur client file: addEvent("guievent", true) function mama() -- localPlayer isnt needed here since its clientside - nothing is needed, since its only triggered on this client and not all clients. guiSetVisible(window, true) showCursor ( true ) end addEventHandler("guievent", getRootElement(), mama) i take it u have ur window and marker defined elsewhere. everything else u might need to know explaining about the parameters and arguments etc can be found on the wiki. [UVA]Scooby Founder Of UVA - Ultimate Vice Assassins http://www.uvaclan.com/
Wei Posted April 24, 2012 Author Posted April 24, 2012 thanks man ! Diet with russian vodka, lose 3 days in one week !
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now