MAB Posted August 13, 2015 Posted August 13, 2015 all works except the setElementVisibleTo function. the player still can see the marker but it worked when i used triggerServerEvent local changer = createMarker ( 217.48380, -98.56483, 1004.25781, "cylinder", 1.5, 0, 255, 0, 170 ) setElementInterior ( changer, 15 ) function trigger (hit) if isPedInVehicle(hit) then return end showCursor ( hit, true ) setPlayerHudComponentVisible ( hit, "all", false ) showChat ( hit, false ) triggerClientEvent ( hit, "show", hit ) setElementVisibleTo(source,hit,false) end addEventHandler( "onMarkerHit", changer, trigger )
t3wz Posted August 13, 2015 Posted August 13, 2015 you've to remove the visibility of the root element before. setElementVisibleTo( source, root, false ) setElementVisibleTo( source, hit, false )
MAB Posted August 13, 2015 Author Posted August 13, 2015 that will make it invisible for all players, right?
t3wz Posted August 13, 2015 Posted August 13, 2015 that will make it invisible for all players, right? yeah, if you want it invisible for only one player you've to use my previous code with one loop with getElementsByType + setElementVisibleTo ... true.
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