Jump to content

question.


Sparrow

Recommended Posts

Posted

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 

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

Posted

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 :(

Posted

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

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

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 ) 

Posted
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 

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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