~Gangsta~ Posted October 11, 2013 Posted October 11, 2013 how to keep position markers after restart resource? local markers = { {2473.29834, -1667.39075, 13.31641}, {2484.35034, -1660.34570, 13.33595}, {2491.05371, -1675.56274, 13.33595}, } local Marker = {} addEventHandler( 'onResourceStart', getResourceRootElement( getThisResource () ), function() for i, pos in ipairs( markers ) do Marker[i] = createMarker( pos[1], pos[2], pos[3], 'cylinder', 2.5, 0,255,0,255 ) addEventHandler ( "onMarkerHit", Marker[i], destroy ) end end ) function destroy(hitPlayer, matchingDimension) if getElementType( hitPlayer ) == "player" then destroyElement ( source ) end end
Castillo Posted October 11, 2013 Posted October 11, 2013 I don't understand what do you mean. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
~Gangsta~ Posted October 11, 2013 Author Posted October 11, 2013 I wanted make the hidden packages I want to do after the restart taken packages do not appear
Castillo Posted October 11, 2013 Posted October 11, 2013 Ah, you want the destroyed markers to stay destroyed after the resource restarts, for that, you'll need to create a system to save the state of every marker, then when the resource starts, load that state. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
~Gangsta~ Posted October 11, 2013 Author Posted October 11, 2013 how to do it? what to use the functions?
Castillo Posted October 11, 2013 Posted October 11, 2013 Well, you must choose one method for saving, there's SQL, MySQL, XML. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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