Jump to content

Script Fail. HELP


Jullul7000

Recommended Posts

I have a team color name script.

addEventHandler ( "onPlayerSpawn", root, ) 
    function ( ) 
        local team = getPlayerTeam ( source ) 
        if ( team ) then 
            local r, g, b =  getTeamColor ( team ) 
            setPlayerNametagColor ( source, r, g, b ) 
        end 
    end 

But when i hit TAB it doenst work.

It only work in killmessages.

Another question:

Anyone have a script they remove color codes from nicknames when they login?

Link to comment

You Should To Use Timer To Check Player Team So It,s Should To Be Like That :

addEventHandler ( "onPlayerSpawn", root, 
function ( ) 
    setTimer( 
        function() 
            local team = getPlayerTeam ( source ) 
            if ( team ) then 
                local r, g, b =  getTeamColor ( team ) 
                setPlayerNametagColor ( source, r, g, b ) 
            end 
        end, 
        500, 
        1 
    ) 
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...