Nahar Posted February 15, 2014 Share Posted February 15, 2014 ciao, ho provato a fare uno script che cambia il colore della tag ogni 10 secondi, ma il colore resta sempre lo stesso, lo voglio farlo random ma non so come farlo. local r local g local b if(phase)then r,g,b,a = getColorFromString(colors[1]) else r,g,b,a = getColorFromString(r,g,b) end local team = getTeamFromName(Names[1]) if(team)then for i,p in ipairs(getElementsByType("player"))do if(getPlayerTeam(p) == team)then for v,blip in pairs(getAttachedElements(p)) do if getElementType(blip) == "blip" then setBlipColor(blip,r,g,b,255) break end end setTeamColor ( team , r, g, b) end end end Link to comment
Whit3 Posted June 11, 2014 Share Posted June 11, 2014 Anche se la discussione è vecchia, molto vecchia, non ho saputo resistere .. setTimer(function() --Setta Al Team Chiamato W3 colori random definiti in R,G,B r = math.random(0,255) g = math.random(0,255) b = math.random(0,255) teamcane = getTeamFromName("W3") setTeamColor(teamcane,r,g,b) end,2000,0)--Ogni 2 Secondi Cambia il colore Link to comment
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