Sparrow Posted December 30, 2011 Share Posted December 30, 2011 I do invisble script days ago, it work well, I want only to know how to set the blip of the players in radar who is invisble hided. Thank you. Link to comment
JR10 Posted December 30, 2011 Share Posted December 30, 2011 You can check an element's alpha by getElementAlpha And use function destroyBlipAttachedTo ( player ) local attached = getAttachedElements ( player ) if not attached then return end for index , attachedElement in pairs ( attached ) do if getElementType ( attachedElement ) == "blip" then destroyElement ( attachedElement ) end end end Link to comment
Sparrow Posted December 31, 2011 Author Share Posted December 31, 2011 And use function destroyBlipAttachedTo ( player ) local attached = getAttachedElements ( player ) if not attached then return end for index , attachedElement in pairs ( attached ) do if getElementType ( attachedElement ) == "blip" then destroyElement ( attachedElement ) end end end this didn't work, the blip didn't hided Link to comment
bandi94 Posted December 31, 2011 Share Posted December 31, 2011 when you call that function ? you need to call it when you make the pelyaer invisible or post all your script to can help you and you call it destroyBlipAttachedTo( player ) ---player or source or what you set on your function Link to comment
Sparrow Posted December 31, 2011 Author Share Posted December 31, 2011 my script: function invisible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, false) setElementAlpha(source, 0) end end addCommandHandler ( "invis", invisible ) function visible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, true) setElementAlpha(source, 255) end end addCommandHandler ( "vis", visible ) Link to comment
bandi94 Posted December 31, 2011 Share Posted December 31, 2011 function invisible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, false) setElementAlpha(source, 0) destroyBlipAttachedTo ( source ) end end addCommandHandler ( "invis", invisible ) function visible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, true) setElementAlpha(source, 255) destroyBlipAttachedTo ( source ) end end addCommandHandler ( "vis", visible ) function destroyBlipAttachedTo ( player ) local attached = getAttachedElements ( player ) if not attached then return end for index , attachedElement in pairs ( attached ) do if getElementType ( attachedElement ) == "blip" then if getElementAlpha(attachedElement)==255 then setElementAlpha(attachedElement,0) else setElementAlpha(attachedElement,255) end end end end 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