GM.Name = "Trouble in Terrorist Town" GM.Author = "Bad King Urgrain" GM.Email = "thegreenbunny@gmail.com" GM.Website = "ttt.badking.net" GM.Version = "27" -- This is for Fretta but won't interfere with anything. Many of them will -- probably go unused due to overrides but I'm lazy. GM.Help = "Traitors must try to kill all Innocent Terrorists before their treachery is found out!" GM.TeamBased = false GM.AllowAutoTeam = false GM.AllowSpectating = true GM.SelectClass = false GM.NoPlayerDamage = false GM.NoPlayerSelfDamage = false GM.NoPlayerTeamDamage = true GM.NoPlayerPlayerDamage = false GM.NoNonPlayerPlayerDamage = false GM.TakeFragOnSuicide = true GM.SelectColor = false GM.NoAutomaticSpawning = true -- doing our own spawning, thanks GM.Customized = false -- Round status consts ROUND_WAIT = 1 ROUND_PREP = 2 ROUND_ACTIVE = 3 ROUND_POST = 4 -- Player roles ROLE_INNOCENT = 0 ROLE_TRAITOR = 1 ROLE_DETECTIVE = 2 ROLE_NONE = ROLE_INNOCENT -- Game event log defs EVENT_KILL = 1 EVENT_SPAWN = 2 EVENT_GAME = 3 EVENT_FINISH = 4 EVENT_SELECTED = 5 EVENT_BODYFOUND = 6 EVENT_C4PLANT = 7 EVENT_C4EXPLODE = 8 EVENT_CREDITFOUND = 9 EVENT_C4DISARM = 10 WIN_NONE = 1 WIN_TRAITOR = 2 WIN_INNOCENT = 3 WIN_TIMELIMIT = 4 -- Weapon categories, you can only carry one of each WEAPON_NONE = 0 WEAPON_MELEE = 1 WEAPON_PISTOL = 2 WEAPON_HEAVY = 3 WEAPON_NADE = 4 WEAPON_CARRY = 5 WEAPON_EQUIP1 = 6 WEAPON_EQUIP2 = 7 WEAPON_ROLE = 8 WEAPON_EQUIP = WEAPON_EQUIP1 WEAPON_UNARMED = -1 -- Kill types discerned by last words KILL_NORMAL = 0 KILL_SUICIDE = 1 KILL_FALL = 2 KILL_BURN = 3 -- Entity types a crowbar might open OPEN_NO = 0 OPEN_DOOR = 1 OPEN_ROT = 2 OPEN_BUT = 3 OPEN_NOTOGGLE = 4 --movelinear include("util.lua") include("lang_shd.lua") -- uses some of util include("equip_items_shd.lua") -- Install the Fretta bits and bobs we use, while overriding/removing the rest -- (ie. most of it) if SERVER then include("fretta_must_die.lua") elseif CLIENT then include("cl_fretta_must_die.lua") end function DetectiveMode() return GetGlobalBool("ttt_detective", false) end function HasteMode() return GetGlobalBool("ttt_haste", false) end -- Create teams TEAM_TERROR = 1 TEAM_SPEC = TEAM_SPECTATOR function GM:CreateTeams() team.SetUp(TEAM_TERROR, "Terrorists", Color(0, 200, 0, 255), false) team.SetUp(TEAM_SPEC, "Spectators", Color(200, 200, 0, 255), true) -- Not that we use this, but feels good team.SetSpawnPoint(TEAM_TERROR, "info_player_deathmatch") team.SetSpawnPoint(TEAM_SPEC, "info_player_deathmatch") end -- Everyone's model local ttt_playermodels = { Model("models/player/phoenix.mdl"), Model("models/player/arctic.mdl"), Model("models/player/guerilla.mdl"), Model("models/player/leet.mdl") }; function GetRandomPlayerModel() return table.Random(ttt_playermodels) end -- Kill footsteps on player and client function GM:PlayerFootstep(ply, pos, foot, sound, volume, rf) if ValidEntity(ply) and (ply:Crouching() or ply:GetMaxSpeed() < 150) then -- do not play anything, just prevent normal sounds from playing return true end end -- Weapons and items that come with TTT. Weapons that are not in this list will -- get a little marker on their icon if they're buyable, showing they are custom -- and unique to the server. DefaultEquipment = { -- traitor-buyable by default [ROLE_TRAITOR] = { "weapon_ttt_c4", "weapon_ttt_flaregun", "weapon_ttt_knife", "weapon_ttt_phammer", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_sipistol", "weapon_ttt_teleport", "weapon_ttt_decoy", EQUIP_ARMOR, EQUIP_RADAR, EQUIP_DISGUISE }, -- detective-buyable by default [ROLE_DETECTIVE] = { "weapon_ttt_binoculars", "weapon_ttt_defuser", "weapon_ttt_health_station", "weapon_ttt_stungun", "weapon_ttt_cse", "weapon_ttt_teleport", EQUIP_ARMOR, EQUIP_RADAR }, -- non-buyable [ROLE_NONE] = { "weapon_ttt_confgrenade", "weapon_ttt_m16", "weapon_ttt_smokegrenade", "weapon_ttt_unarmed", "weapon_ttt_wtester", "weapon_tttbase", "weapon_tttbasegrenade", "weapon_zm_carry", "weapon_zm_improvised", "weapon_zm_mac10", "weapon_zm_molotov", "weapon_zm_pistol", "weapon_zm_revolver", "weapon_zm_rifle", "weapon_zm_shotgun", "weapon_zm_sledge", "weapon_ttt_glock" } };