Need help with camera views in (fretta) gamemode scripting
0 replies, posted
I'm making a Fretta gamemode from scratch, I have a Player_class table: [CODE]
local CLASS = {}
CLASS.DisplayName = "Contestant"
CLASS.WalkSpeed = 500
CLASS.CrouchedWalkSpeed = 0.5
CLASS.RunSpeed = 700
CLASS.DuckSpeed = 0.5
CLASS.JumpPower = 300
--CLASS.PlayerModel = "models/player/breen.mdl"
CLASS.DrawTeamRing = true
CLASS.CanUseFlashlight = true
CLASS.MaxHealth = 100
CLASS.StartHealth = 100
function CLASS:Loadout( pl )
pl:SetCarrier( false )
pl:Give( "weapon_jump" )
end
function CLASS:OnSpawn( pl )
-- pl:StripWeapons()
pl:CrosshairDisable()
end
function CLASS:OnDeath( pl )
pl:SetTeam( TEAM_DEAD )
end
player_class.Register( "Contestant", CLASS )[/CODE]
But, with the simple function of: [CODE]function GM:PlayerInitialSpawn( pl )
pl:StripWeapons()
pl:SetTeam( TEAM_SPECTATOR )
--pl:SetTeam( TEAM_ALIVE )
pl:ConCommand("AV_PostInitalSpawn")
if self.StoppedProps then
timer.Start("dropprops")
self.StoppedProps = false
end
end
end[/CODE] in my init.lua causes my players to see the Gordon Freeman goatee and glasses on the screen. The initial spawn function is necessary to spawn the obstacles in the gamemode, unless someone can help me find a way to have the props spawn by a separate function. any suggestions and/or help will be greatly appreciated! :D
Sorry, you need to Log In to post a reply to this thread.