InVision Posted August 22, 2013 Share Posted August 22, 2013 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
iPrestege Posted August 22, 2013 Share Posted August 22, 2013 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
InVision Posted August 22, 2013 Author Share Posted August 22, 2013 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
InVision Posted August 22, 2013 Author Share Posted August 22, 2013 (edited) 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 August 22, 2013 by Guest Link to comment
WASSIm. Posted August 22, 2013 Share Posted August 22, 2013 setElementVisibleTo is server side Link to comment
InVision Posted August 22, 2013 Author Share Posted August 22, 2013 setElementVisibleTo is server side Ah, thanks, I'm kind of new to scripting, experimenting until I get a final result is what I do, lawl. Link to comment
InVision Posted August 22, 2013 Author Share Posted August 22, 2013 setElementVisibleTo is server side Even as Server Side it completely destroy the script Link to comment
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