Jump to content

How set object alpha to 255?


Tycka

Recommended Posts

Posted

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) 

Posted
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
Posted

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.

Posted
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
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...