Deathrun Playermodel Colors

Hey! I want to make my deathrun more custom, so any way I can make the runners clothes have randomised colors instead of just blue. (The Citizen Models)

Please help! :slight_smile:

gamemode > deathrun > shared.lua
Simply change the Color code. Just look up and RGB color picker to find colors.


function GM:CreateTeams()
	TEAM_DEATH = 2
	team.SetUp( TEAM_DEATH, "Death", Color( 180, 60, 60, 255 ), false )
	team.SetSpawnPoint( TEAM_DEATH, "info_player_terrorist" )

	TEAM_RUNNER = 3
	team.SetUp( TEAM_RUNNER, "Runner", Color( 60, 60, 180, 255 ), false )
	team.SetSpawnPoint( TEAM_RUNNER, "info_player_counterterrorist" )

	team.SetUp( TEAM_SPECTATOR, "Spectator", Color( 125, 125, 125, 255 ), true )
end


I don’t think you read my thread correctly, I want the runner’s playermodels to have random color on their clothes :slight_smile:

every round that starts, make a math.random 3 times, call it on R - G - B.
And when a player spawn which is apart of the team death, using Player:SetColor(variable).

Not sure how I’d go about making that code, could you make me an example?

i’ve already fed you up with telling you how.
an example would be giving you the code.

http://wiki.garrysmod.com/page/GM/PlayerSpawn - (Use a hook not a function)
http://wiki.garrysmod.com/page/Entity/SetColor
http://wiki.garrysmod.com/page/math/random

Thanks :slight_smile: