Created
April 20, 2022 15:28
-
-
Save wgetJane/83064d0ac013e4b64aca2e9a87a47944 to your computer and use it in GitHub Desktop.
mapcfgs examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- disable traitor traps | |
for _, v in pairs(ents.FindByClass"ttt_traitor_button") do | |
v:Remove() | |
end | |
-- disable traitor tester | |
for _, v in pairs(ents.FindByName"GoldBlock") do | |
v:Remove() | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for _, v in pairs{ | |
-- traitor teleporter buttons | |
3762, 3773, 3777, 3781, | |
-- traitor teleporter doors | |
3761, 3774, 3776, 3780, | |
-- wood planks | |
1236, 1237, 1238, 1239, | |
1240, 1241, 1242, 1243, | |
1271, 1272, | |
} do | |
local e = ents.GetMapCreatedEntity(v) | |
if not IsValid(e) then | |
-- prevent the wood planks from being broken | |
elseif e:GetClass() == "func_breakable" | |
and e:GetInternalVariable"m_Material" == 1 | |
then | |
e:SetKeyValue("spawnflags", 1) | |
e:SetSaveValue("m_takedamage", 0) | |
-- allow anybody to open the teleporter doors | |
elseif e:GetClass() == "func_door" | |
and e:GetName():StartWith"t_door0" | |
then | |
e:SetKeyValue("spawnflags", 65536 + 1280) | |
-- delete traitor buttons for the teleporter doors | |
elseif e:GetClass() == "ttt_traitor_button" | |
and e:GetDescription() == "Open door." | |
then | |
e:Remove() | |
end | |
end | |
-- boosts fps noticeably | |
for _, v in pairs(ents.FindByClass"func_dustcloud") do | |
v:Remove() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment