DarkLink Posted June 29, 2011 Share Posted June 29, 2011 Okay guys, hi there, I am with a little problem here. I want to make a marker invisible, this marker is inside a interior. I have this to get the marker from map file: local xara = getElementByID("xara") and then when player teleports to that checkpoint, I have this code: setElementAlpha(xara,0) All server side, and I dont have errors on console Weird Link to comment
JR10 Posted June 29, 2011 Share Posted June 29, 2011 Post the code. And why not setElementVisibleTo Link to comment
DarkLink Posted June 29, 2011 Author Share Posted June 29, 2011 Well I can also use that, but setElementAlpha should work local xara = getElementByID("xara") local x,y,z = getElementPosition(xara) function teleporte (deliver, hitElement) if(isElementWithinMarker(hitElement, entrada)) then removePedFromVehicle(deliver) setElementInterior( deliver, 6) setTimer(setElementPosition, 500, 1, deliver, x, y, z + 1) toggleControl( deliver, "enter_exit", true) setElementAlpha(xara,0) else outputChatBox("car not in marker") end end function is being called.. player is being teleporte to the marker, but marker is full opaque.. must be invisible if I put 0 on alpha argument thanks jacob Link to comment
JR10 Posted June 29, 2011 Share Posted June 29, 2011 This function sets the alpha(transparency) value for the specified element. This can be a player or a vehicle. Link to comment
DarkLink Posted June 29, 2011 Author Share Posted June 29, 2011 This function sets the alpha(transparency) value for the specified element. This can be a player or a vehicle. weird I though I could use it, didnt even read all the wiki page My mistake, sorry guys. Thanks jacob Link to comment
DarkLink Posted July 1, 2011 Author Share Posted July 1, 2011 Its not working jacob, I tryed this: setElementVisibleTo(xara,getRootElement(),false) but its not working , the marker is visible, i dont have any errors on console. Should I create marker with visible to nil? instead of creating with visible to the root and then change its visibility to false for everyone... Thanks! EDIT: I NOTICE this on wiki: https://wiki.multitheftauto.com/wiki/SetMarkerSize Setting negative value will "flip" the marker, do nothing or make it invisible: .. .. So if I put a size negative will make the marker invisible? ty Link to comment
qaisjp Posted July 1, 2011 Share Posted July 1, 2011 r,g,b,_ = getMarkerColor(marker) setMarkerColor(marker,r,g,b, 0) sets alpha 0. Link to comment
Deltanic Posted July 1, 2011 Share Posted July 1, 2011 This function sets the alpha(transparency) value for the specified element. This can be a player or a vehicle. But I saw DoomedSpaceMarine doing this somehow on objects in his snow script Link to comment
qaisjp Posted July 1, 2011 Share Posted July 1, 2011 This function sets the alpha(transparency) value for the specified element. This can be a player or a vehicle. But I saw DoomedSpaceMarine doing this somehow on objects in his snow script Yes that is true, the last time I checked setElementAlpha worked on objects.. Link to comment
JR10 Posted July 1, 2011 Share Posted July 1, 2011 Hmm, maybe objects is added and the wiki is outdated. Link to comment
DarkLink Posted July 1, 2011 Author Share Posted July 1, 2011 Thanks guys, Found my problem LOL! I had on my map, 2 markers with same name, coords, colors, everything.. like a clone.. And when I was setting alpha 0 for that marker, the other marker was still there with alpha 255 Now I delete one from the map file, and its working. thanks 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