'~DaLesTe^' Posted July 10, 2015 Share Posted July 10, 2015 function createTeamsOnStart () teamstaff = createTeam ( "Equipe M4", color ) local color = {} color[1] = math.random(0,126) color[2] = math.random(0,200) color[3] = math.random(0,126) color[4] = math.random(0,255) setTeamColor ( teamstaff, color ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function lol ( player, command ) setPlayerTeam ( player, teamstaff ) end addCommandHandler ( "gm", TeamsOnStart ) How do I get the gang I created typing / gm be changing color every 2 seconds Link to comment
GTX Posted July 10, 2015 Share Posted July 10, 2015 setTimer(function() setTeamColor(teamstaff, math.random(0, 255), math.random(0, 255), math.random(0, 255)) end, 2000, 0) Is that what you want? Link to comment
'~DaLesTe^' Posted July 10, 2015 Author Share Posted July 10, 2015 How can I do this with a vehicle that I'm in? Without change others but only my. Link to comment
GTX Posted July 10, 2015 Share Posted July 10, 2015 Client side: setTimer(function() setVehicleColor(getPedOccupiedVehicle(localPlayer), math.random(0, 255), math.random(0, 255), math.random(0, 255)) end, 2000, 0) Link to comment
'~DaLesTe^' Posted July 10, 2015 Author Share Posted July 10, 2015 Client side: setTimer(function() setVehicleColor(getPedOccupiedVehicle(localPlayer), math.random(0, 255), math.random(0, 255), math.random(0, 255)) end, 2000, 0) Only I see the changing color, those outside the car does not see 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