DarkLink Posted June 29, 2011 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 Borderpatrol Project Gamemode - Under Development (80%)
JR10 Posted June 29, 2011 Posted June 29, 2011 Post the code. And why not setElementVisibleTo Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
DarkLink Posted June 29, 2011 Author 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 Borderpatrol Project Gamemode - Under Development (80%)
JR10 Posted June 29, 2011 Posted June 29, 2011 This function sets the alpha(transparency) value for the specified element. This can be a player or a vehicle. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
DarkLink Posted June 29, 2011 Author 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 Borderpatrol Project Gamemode - Under Development (80%)
JR10 Posted June 29, 2011 Posted June 29, 2011 No problem. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
DarkLink Posted July 1, 2011 Author 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 Borderpatrol Project Gamemode - Under Development (80%)
MTA Team qaisjp Posted July 1, 2011 MTA Team Posted July 1, 2011 r,g,b,_ = getMarkerColor(marker) setMarkerColor(marker,r,g,b, 0) sets alpha 0.
botanist Posted July 1, 2011 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 Handling editor | Modloader
MTA Team qaisjp Posted July 1, 2011 MTA Team 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..
JR10 Posted July 1, 2011 Posted July 1, 2011 Hmm, maybe objects is added and the wiki is outdated. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
DarkLink Posted July 1, 2011 Author 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 Borderpatrol Project Gamemode - Under Development (80%)
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