Tycka Posted December 4, 2014 Posted December 4, 2014 How I can set object alpha to 255? I try: local alpha = 255 function bat() setElementAlpha ( 336, 255 ) end
undefined Posted December 4, 2014 Posted December 4, 2014 If you want to set alpha for all 336 code object, you can use loop. e.g: for index, object in ipairs(getElementsByType ("object")) do if getElementModel(object) == 336 then setElementAlpha(object, 255) end end If not, create object with variable and try this; object = createObject(blablabla) setElementAlpha(object, 255)
Tycka Posted December 4, 2014 Author Posted December 4, 2014 If you want to set alpha for all 336 code object, you can use loop. e.g: for index, object in ipairs(getElementsByType ("object")) do if getElementModel(object) == 336 then setElementAlpha(object, 255) end end If not, create object with variable and try this; object = createObject(blablabla) setElementAlpha(object, 255) I use this: for index, object in ipairs(getElementsByType ("object")) do if getElementModel(object) == 336 then setElementAlpha(object, 255) end end But when I have bat in hand I still see it.
MTA Team 0xCiBeR Posted December 4, 2014 MTA Team Posted December 4, 2014 That's because in that code you are setting the alpha to 255. If you wish to not see it, you should set it to 0.
Tycka Posted December 4, 2014 Author Posted December 4, 2014 That's because in that code you are setting the alpha to 255. If you wish to not see it, you should set it to 0. anyway don't work. I see bat when I have it hand
MTA Team 0xCiBeR Posted December 4, 2014 MTA Team Posted December 4, 2014 If you are talking about the bat(weapon) then you can't set it's alpha. You have to make a custom .txd file so it's transparent.
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