-.Paradox.- Posted June 16, 2013 Posted June 16, 2013 (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 June 16, 2013 by Guest
Castillo Posted June 16, 2013 Posted June 16, 2013 You can set the nametag color, blip color when you set the team.
-.Paradox.- Posted June 16, 2013 Author Posted June 16, 2013 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)
iPrestege Posted June 16, 2013 Posted June 16, 2013 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.
-.Paradox.- Posted June 16, 2013 Author Posted June 16, 2013 Can you remove vehicle color it's just a fail, and those it work with blip too.
iPrestege Posted June 16, 2013 Posted June 16, 2013 You can set a blip color for 0 id for ex : createBlip ( 0,0,0,0 ) Any id other 0 the color of it won't change.
-.Paradox.- Posted June 16, 2013 Author Posted June 16, 2013 createBlip(0,0,0,0) = createBlip(r,g,b,a) ?
-.Paradox.- Posted June 16, 2013 Author Posted June 16, 2013 Anyway can you remove the vehicle color function it work perfectly thanks
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now