Hey there,
I am coding a gamemode, and i kinda need some help regarding spectating.
I have two problems.
1. When I use ply:Spectate( OBS_MODE_ROAMING ) or OBS_MODE_CHASE it still just spawns them as a normal player.
2. When I use ply:SetColor(Color(255,255,255,0) it doesnt make them invisible.
Here is my code:
function GM:PlayerInitialSpawn( ply )
ply:SetTeam( TEAM_SPEC )
ply:Spectate( OBS_MODE_CHASE )
timer.Create("Timer.Initspawn."..ply:SteamID(), 1, 1, function()
ply:SetMoveType( MOVETYPE_NOCLIP )
ply:SetColor(Color(255,255,255,0))
end)
ply:Respawn()
end
EDIT: The movetype_noclip movetype is my terrible fix for the spectating.