Jump to content

Team Color


Recommended Posts

Posted (edited)

Hello everybody,

I have a server on MTA, with 5 team. Everything is okay with the script, but I want to add one thing.

When I put players in the team, their name have the same color in chat and blip example : Fallen Army Team : have green color, I want this green color for all team player because they can't have same color just in team chat.

Can someone help me for this? Thank you!

Edited by Guest

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

You can set the nametag color, blip color when you set the team.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

How ?

And i'm using autoteams

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted
addEventHandler("onResourceStart",resourceRoot,function() 
    for i,v getElementsByType("vehicle")do 
        local player = getVehicleController(i) 
        if(player)then 
            local pedTeam = getPlayerTeam(player) 
            if(pedTeam)then 
                local r,g,b = getTeamColor(pedTeam) 
                setVehicleColor(i,r,g,b) 
            else 
                setVehicleColor(i,255,255,255) 
            end 
        else 
            setVehicleColor(i,255,255,255) 
        end 
    end 
end) 
  
addEventHandler("onVehicleStartEnter",root,function(player,_,jacked) 
    local r,g,b = getTeamColor(getPlayerTeam(player)) 
    setVehicleColor(source,r,g,b) 
end) 
addEventHandler("onVehicleExit",root,function() 
    setVehicleColor(source,255,255,255) 
end) 

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted
addEventHandler("onResourceStart",resourceRoot,function() 
    for i,v in ipairs ( getElementsByType("vehicle") ) do 
        local player = getVehicleController(v) 
        if(player)then 
            local pedTeam = getPlayerTeam(player) 
            if(pedTeam)then 
                local r,g,b = getTeamColor(pedTeam) 
                setVehicleColor(v,r,g,b) 
            else 
                setVehicleColor(v,255,255,255) 
            end 
        else 
            setVehicleColor(v,255,255,255) 
        end 
    end 
end) 
  
addEventHandler("onVehicleStartEnter",root,function(player,_,jacked) 
    if not getPlayerTeam ( player ) then return end 
    local r,g,b = getTeamColor(getPlayerTeam(player)) 
    setVehicleColor(source,r,g,b) 
end) 
addEventHandler("onVehicleExit",root,function() 
    setVehicleColor(source,255,255,255) 
end) 

Try this if doesn't work post the error here.

  

Posted

Can you remove vehicle color it's just a fail, and those it work with blip too.

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

I can't understand.

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted
  
createBlip(0,0,0,0) = createBlip(r,g,b,a) ? 
  

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

Anyway can you remove the vehicle color function it work perfectly thanks

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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