Jump to content

Help wanted


manve1

Recommended Posts

I got a problem when i try to get marker color for an output message

local topdeck = createMarker( 170, 255, 9.5, 'cylinder', 2.0, 255, 255, 255, 100 ) 
  
addEvent('changecolor1topdeck', true) 
addEventHandler('changecolor1topdeck', getRootElement( ), 
function( ) 
    if ( getElementType ( source ) == "player" ) then 
        local nR, nG, nB = getTeamColor( getPlayerTeam( source ) ) 
        setMarkerColor( topdeck, nR, nG, nB, 100 ) 
    end 
end 
) 
  
function nana() 
local r1, g1, b1, a1 = getMarkerColor( topdeck ) 
if ( r1 == 0 and g1 == 255 and b1 == 0 ) then 
outputChatBox( '#FF0000[iNFO]: LOL Fail.', root, 255, 255, 255, true ) 
end 
end 

Link to comment
addEvent('needTheSh*t', true) 
addEventHandler('needTheSh*t', getLocalPlayer(), 
function() 
local bar = guiCreateProgressBar( 0.05, 0.75, 0.9, 0.05, true, computerGUI ) 
outputChatBox('#FF0000[iNFO]: #FFFFFFHacking in progress...', 255, 255, 255, true) 
  
capturing = setTimer( 
function() 
guiProgressBarSetProgress(bar, guiProgressBarGetProgress(bar) + 5) 
if ( guiProgressBarGetProgress(bar) == 100 ) then 
outputChatBox('#FF0000[iNFO]: #FFFFFFHacking finnished.', 255, 255, 255, true) 
    triggerServerEvent('changecolor1topdeck', localPlayer) 
    killTimer( capturing ) 
    if isElement( bar ) and (bar) then 
    destroyElement( bar ) 
    end 
    end 
end, 1000, 0 
) 
  
    addEvent('noNeedTheSh*t', true) 
    addEventHandler('noNeedTheSh*t', getLocalPlayer(), 
    function() 
    if isElement( bar ) and (bar) then  
    destroyElement( bar ) 
    if ( capturing ) then 
    killTimer( capturing ) 
    end 
    end 
    end 
    ) 
end 
) 

Edited by Guest
Link to comment

You want to use it after the marker color has been set? if so:

local topdeck = createMarker( 170, 255, 9.5, 'cylinder', 2.0, 255, 255, 255, 100 ) 
  
addEvent ( 'changecolor1topdeck', true ) 
addEventHandler ( 'changecolor1topdeck', getRootElement( ), 
    function ( ) 
        if ( getElementType ( source ) == "player" ) then 
            local nR, nG, nB = getTeamColor ( getPlayerTeam ( source ) ) 
            setMarkerColor ( topdeck, nR, nG, nB, 100 ) 
            nana ( ) 
        end 
    end 
) 
  
function nana ( ) 
    local r1, g1, b1, a1 = getMarkerColor ( topdeck ) 
    if ( r1 == 0 and g1 == 255 and b1 == 0 ) then 
        outputChatBox ( '#FF0000[iNFO]: LOL Fail.', root, 255, 255, 255, true ) 
    end 
end 

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