How to do a chooserandom model?

Hi, I’m trying to change a zombie survival fast zombie class so that it picks a random model each time someone plays it.

Heres the code

RegisterZombieClass(“Fast Zombie”,
{
Name = “Fast Zombie”,
Wave = 0, – The decimal is a percent of the total waves. Example, this would be wave 3 in a game with 10 waves total. Always rounded down.
Health = 175,
SWEP = “weapon_zs_fastzombie”,
Model = Model(“models/Zombie/Fast.mdl”),
Speed = 310,
Description = “A very fast, heavily decomposed undead cadaver.@Unique abilities: Can climb walls and lunge at its victims.”,
PainSounds = {
Sound(“npc/fast_zombie/leap1.wav”),
Sound(“npc/fast_zombie/wake1.wav”)
},
DeathSounds = {
Sound(“npc/fast_zombie/fz_alert_close1.wav”)
},
PlayerFootstep = true
})

Try something around the lines of…

function PickTehShit(ply)

local MODELRAND = (Math.Rand( 1, 3))
local 1 = “”
local 2 = “”
local 3 = “”
If (ply:Team() == “TEAM NAME”) then
(ply:SetModel( MODELRAND )
end

It’s really late were i am, Use that for an idea, But I’m going to sleep now, so. The reason it’s so sloppy is because it’s only for an idea, and its very late, Night!

Eurgh.

[lua]Playermodelz = {}
Playermodelz[1] = “models/player/breen.mdl”
Playermodelz[2] = “nextmodel”
Playermodelz[3] = “nextmodel”

function RandomPlayermodel( ply )

if ply:Team() == “Team Name Here” then
ply:SetModel( table.Random(Playermodelz) )

end

hook.Add(“PlayerSpawn”, “Randomplayermodel”, RandomPlayermodel)[/lua]

I know there is a hook on which to change the playermodel, Just cant remember its name.

Have you tried doing something like

[lua]RegisterZombieClass(“Fast Zombie”,
{
Name = “Fast Zombie”,
Wave = 0, – The decimal is a percent of the total waves. Example, this would be wave 3 in a game with 10 waves total. Always rounded down.
Health = 175,
SWEP = “weapon_zs_fastzombie”,

zombiemodels = { “models/here”, “etc”, “etc” }

Model = Model( table.Random( zombiemodels ) )
Speed = 310,
Description = “A very fast, heavily decomposed undead cadaver.@Unique abilities: Can climb walls and lunge at its victims.”,
PainSounds = {
Sound(“npc/fast_zombie/leap1.wav”),
Sound(“npc/fast_zombie/wake1.wav”)
},
DeathSounds = {
Sound(“npc/fast_zombie/fz_alert_close1.wav”)
},
PlayerFootstep = true
})[/lua]

There ya go, Take it from those guys, It was like 4:00 AM were i was, I couldn’t think straight.

Thanks, it worked.