Reggae Posted March 21, 2014 Share Posted March 21, 2014 ,But when I type / god he is invisible only when I type / god again he goes invisible,What do need to edit when typing god again he normal? I want to enter / god he invisible, and when typing is visible again. function toggleInvis ( thePlayer ) if getElementAlpha( thePlayer ) == 0 then setElementAlpha ( thePlayer, 130) else setElementAlpha ( thePlayer, 0 ) end end addCommandHandler ( "god", toggleInvis ) Link to comment
xXMADEXx Posted March 21, 2014 Share Posted March 21, 2014 Try this function toggleInvis ( thePlayer ) if getElementAlpha( thePlayer ) == 0 then setElementAlpha ( thePlayer, 255) else setElementAlpha ( thePlayer, 0 ) end end addCommandHandler ( "god", toggleInvis ) 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