Jump to content

Hide element?


InVision

Recommended Posts

Is it possible to hide an element without destroying it?

I have a script that when you enter a marker in a vehicle you receive money, but when you exit the vehicle the marker get's destroyed, and you have to start again at the first marker instead of the one you last hit.

Link to comment
Is it possible to hide an element without destroying it?

I have a script that when you enter a marker in a vehicle you receive money, but when you exit the vehicle the marker get's destroyed, and you have to start again at the first marker instead of the one you last hit.

You can change the dimension of the element :

setElementDimension 

Link to comment

I tried changing the dimension, but it still set the marker back to the first xyz id

addEventHandler("onClientVehicleExit", getRootElement(), 
function() 
    if isElement(theCheckkKpointt) then 
        setElementDimension (thCheckkKpointt, 1) 
    end 
    if isElement(TTtheBbBlip) then 
        setElementDimension(TTtheBbBlip, 1) 
    end 
end 
) 

Link to comment

Tried

setElementVisibleTo 

didn't work

addEventHandler("onClientVehicleExit", getRootElement(), 
function() 
local thePlayer = getPlayerFromName ( "thePlayer" ) 
if ( thePlayer ) then 
    x, y, z = getElementPosition ( thePlayer ) 
    theCheckkKpointt (name, size, x, y, z ) 
    setElementVisibleTo ( theCheckkKpointt, getRootElement ( ), false ) 
    setElementVisibleTo ( theCheckkKpointt, thePlayer, true ) 
end 
) 

Edited by Guest
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...