Jump to content

[SOLVED]attaching Problem


K4stic

Recommended Posts

addEventHandler( "onClientRender", root, 
    function () 
        for i, theBlip in pairs( getElementsByType("player") ) do 
        if ( isElement( i ) ) and not ( i == localPlayer ) then 
            if ( getElementData( localPlayer, "gang" ) ) and ( getElementData( i, "gang" ) ) then 
                if ( getElementData( localPlayer, "gang" ) == getElementData( i, "gang" ) and ( i ~= localPlayer ) and not groupBlips[theBlip]) then 
                    if not ( groupBlips[i] ) then 
                    local Tx, Ty, Tz = getElementPosition( theBlip ) 
                    groupBlips[i] = exports.customblips:createCustomBlip(Tx, Ty, 10, 10, "blips/groupblip.png", 1500) 
                    attachElements ( groupBlips[i], i ) 
                    exports.customblips:setCustomBlipRadarScale ( groupBlips[i], 2 ) 
                end 
            end 
        end 
        else 
            if ( isElement( groupBlips[i] ) ) then 
                exports.customblips:destroyCustomBlip ( groupBlips[i] ) 
                groupBlips[thePlayer] = nil 
            end 
        end 
        if ( getElementAlpha( i ) == 0 ) then 
            setBlipColor( theBlip, 225, 225, 225, 0 ) 
            if ( isElement( groupBlips[i] ) ) then 
                exports.customblips:destroyCustomBlip ( groupBlips[i] ) 
                groupBlips[i] = nil 
            end 
            else 
                local R, G, B = getTeamColor( getPlayerTeam( i ) ) 
                setBlipColor( theBlip, R, G, B, 225 ) 
            end 
        end 
    end 
) 

No error's nothing just then resource start they create blip but no attach it :3

Edited by Guest
Link to comment

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