Forcing spectate

I’m pretty much trying to make it so you’re always spectating one way or another. I’m using Fretta as the base. As an obvious solution I tried this in my init.lua:

[lua]
include(“shared.lua”)

function GM:CanPlayerSuicide(ply)
return false
end

function GM:PlayerInitialSpawn(ply)
ply:Spectate(OBS_MODE_ROAMING)
ply:SetMoveType(MOVETYPE_OBSERVER)
end
[/lua]

But when I spawn and go into spectate, Fretta kicks in, makes me spectate the place I “died” and adds the cooldown for me to spawn again.

Any way to force the player into being a spectator and making Fretta happy about this?

It’s really useful to have the Fretta code available (it’s all pretty simple & readable). Basically I would just find out which Fretta function is messing up your code, and override it with a fixed version

I think you can extract it from the gcf. Personally, I like using the gmod svn version (anon:anon@ http://svn.facepunch.com/svn/garrysmod/trunk/garrysmod/) which just works as a source mod & doesn’t require you to extract anything

Not sure specifically what’s causing the problem though. Maybe someone else can help with that if you can’t deduce it via the fretta code