So I'm trying to set the player model for Deaths in deathrun, I have tried the auto run solution but that didn't work either.
[code] local mdl = hook.Call( "ChangePlayerModel", GAMEMODE, ply ) or false
if ply:Team() == TEAM_RUNNER then
ply:SetModel( mdl or table.Random( rModels ) )
elseif ply:Team()== TEAM_DEATH then
util.PrecacheModel( "models/grim/grim.mdl" )
function GM:PlayerSetModel( ply )
ply:SetModel( "models/grim/grim.mdl" )
end
hook.Add("PlayerSpawn", "SetModel", function(ply)
GAMEMODE:PlayerSetModel( ply )
end)
end[/code]
That causes this error [code][ERROR] gamemodes/deathrun/gamemode/cl_init.lua:84: attempt to call method 'GetRoundTime' (a nil value)
1. unknown - gamemodes/deathrun/gamemode/cl_init.lua:84[/code] and pretty much brakes the gamemode to boot.
[code]if ply:Team() == TEAM_RUNNER then
ply:SetModel( table.Random( rModels ) )
elseif ply:Team() == TEAM_DEATH then
ply:SetModel( "models/grim/grim.mdl" )
end[/code]
Your code has a lot of useless/broken stuff.
Still not working, I tried that originally. Hang on, I have another idea.
Stupid mistake elsewhere by me, thank you.
Sorry, you need to Log In to post a reply to this thread.