Well, at this point, my console is spammed with “Warning couldn’t load font SandboxLabel” or something along those lines.
My shared.lua
GM.Name = "Rebellious Diplomacy"
GM.Author = ""
GM.Email = ""
GM.Website = "http://www.aelig.co.cc/"
GM.Help = "BREAK THEIR FUCKING LEGS!"
DeriveGamemode( "fretta" )
IncludePlayerClasses()
GM.TeamBased = true
GM.AllowAutoTeam = true
GM.AllowSpectating = true
GM.SecondsBetweenTeamSwitches = 9001
GM.GameLength = 15
GM.VotingDelay = 5
GM.NoPlayerSuicide = true
GM.NoPlayerDamage = false
GM.NoPlayerSelfDamage = true
GM.NoPlayerTeamDamage = false
GM.NoPlayerPlayerDamage = true
GM.NoNonPlayerPlayerDamage = true
GM.NoPlayerFootsteps = false
GM.PlayerCanNoClip = false
GM.TakeFragOnSuicide = true
GM.MaximumDeathLength = 10
GM.MinimumDeathLength = 5
GM.AutomaticTeamBalance = false
GM.ForceJoinBalancedTeams = false
GM.RealisticFallDamage = false
GM.AddFragsToTeamScore = true
GM.NoAutomaticSpawning = true
GM.RoundBased = false
GM.RoundLength = 300
GM.RoundPreStartTime = 5
GM.RoundPostLength = 14
GM.RoundEndsWhenOneTeamAlive = false
GM.EnableFreezeCam = false
GM.DeathLingerTime = 0
GM.SelectModel = true
GM.SelectColor = false
GM.PlayerRingSize = 48
GM.HudSkin = "SimpleSkin"
GM.ValidSpectatorModes = { OBS_MODE_CHASE, OBS_MODE_IN_EYE, }
GM.ValidSpectatorEntities = { "player" }
GM.CanOnlySpectateOwnTeam = true
TEAM_RED = 1
TEAM_BLUE = 2
function GM:CreateTeams()
if ( !GAMEMODE.TeamBased ) then return end
team.SetUp( TEAM_RED, "Red Team Fags", Color( 255, 0, 0, 255 ), true )
team.SetSpawnPoint( TEAM_RED, { "info_player_terrorist" } )
team.SetClass( TEAM_RED, { "BaseClass", "HeavyClass", "LightClass" } )
team.SetUp( TEAM_BLUE, "Blue Team Fags", Color( 0, 0, 255, 255 ), true )
team.SetSpawnPoint( TEAM_BLUE, { "info_player_counterterrorist" } )
team.SetClass( TEAM_BLUE, { "BaseClass", "HeavyClass", "LightClass" } )
team.SetUp( TEAM_SPECTATOR, "Spectators", Color( 200, 200, 200 ), true )
team.SetSpawnPoint( TEAM_SPECTATOR, { "info_player_start", "info_player_terrorist", "info_player_counterterrorist", "info_player_combine", "info_player_rebel" } )
end
And init.lua
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( "shared.lua" )
function GM:OnRoundStart( num )
UTIL_UnFreezeAllPlayers()
end
function GM:OnRoundResult( t )
team.AddScore( t, 1 )
end
function GM:RoundTimerEnd()
if ( !GAMEMODE:InRound() ) then return end
if team.GetScore( TEAM_RED ) < team.GetScore( TEAM_BLUE ) then
GAMEMODE:RoundEndWithResult( TEAM_BLUE )
elseif team.GetScore( TEAM_RED ) > team.GetScore( TEAM_BLUE ) then
GAMEMODE:RoundEndWithResult( TEAM_RED )
end
end
function GM:CheckRoundEnd()
for t=1,2 do
if team.TotalFrags( t ) >= 30 and GAMEMODE:InRound() then
GAMEMODE:RoundEndWithResult( t )
for k,v in pairs( team.GetPlayers( t ) ) do
v:SetFrags( 0 )
end
end
end
end
function GM:DoPlayerDeath( ply, attacker, dmginfo )
self.BaseClass:DoPlayerDeath( ply, attacker, dmginfo )
if dmginfo:IsExplosionDamage() then
ply:SetModel( table.Random( GAMEMODE.Corpses ) )
end
end
I’m just trying to see how things work, and get an understanding for fretta before I go on to making a more complicated gamemode.
Thanks,
Double