View difference between Paste ID: TF7BetAC and 7kEsRTRb
SHOW: | | - or go back to the newest paste.
1-
if SERVER then -- Redundant but I rather not align all that code
1+
customCheck = function(ply)
2-
	AddCSLuaFile()
2+
	int count = 0
3-
	
3+
	for k, v in pairs(player.GetAll()) do
4-
	-- This entire thing is just the portion of my Door Locker code that allows for the door to be broken down.
4+
		if table.HasValue({"POLICE", "CSWAT", "SWAT", "AGENT", "CHIEF"}, team.GetName(v:Team())) then
5-
	-- Its all my code but the idea started as a copy of a concept I saw on Coderhire but I didnt want to pay for
5+
			count = count + 1
6-
	-- Edited by Rynoxx (http://steamcommunity.com/profiles/76561198004177027) to allow doors to automaticly respawn and be respawned by command(s).
6+
7-
	
7+
8-
	CreateConVar("db_doorhealth", 300, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_NOTIFY},"How strong the doors are.")
8+
	return count < 3
9-
	CreateConVar("db_respawntimer", 30, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_NOTIFY},"How long it should take for doors to respawn.")
9+