example update
This commit is contained in:
@@ -203,6 +203,8 @@ traitormod.assignNormalTraitors = function(amount)
|
|||||||
for key, va in pairs(traitormod.selectedCodeResponses) do
|
for key, va in pairs(traitormod.selectedCodeResponses) do
|
||||||
mess = mess .. "\"" .. va .. "\" "
|
mess = mess .. "\"" .. va .. "\" "
|
||||||
end
|
end
|
||||||
|
|
||||||
|
mess = mess .. "\n(You can type in local chat !traitor, to check this information again.)"
|
||||||
end
|
end
|
||||||
|
|
||||||
Game.Log(value.name ..
|
Game.Log(value.name ..
|
||||||
@@ -266,7 +268,7 @@ Hook.Add("roundStart", "traitor_start", function()
|
|||||||
|
|
||||||
local rng = Random.Range(0, 100)
|
local rng = Random.Range(0, 100)
|
||||||
|
|
||||||
if rng < config.traitorShipChance and config.traitorShipEnabled == true then
|
if (rng < config.traitorShipChance and config.traitorShipEnabled == true) and Game.GetRespawnSub() ~= nil then
|
||||||
local amount = config.getAmountShipTraitors(#util.GetValidPlayers())
|
local amount = config.getAmountShipTraitors(#util.GetValidPlayers())
|
||||||
|
|
||||||
Game.Log("Infiltraition Gamemode selected, Random = " .. rng, 6)
|
Game.Log("Infiltraition Gamemode selected, Random = " .. rng, 6)
|
||||||
@@ -281,7 +283,11 @@ Hook.Add("roundStart", "traitor_start", function()
|
|||||||
table.insert(traitormod.gamemodes, "Assasination")
|
table.insert(traitormod.gamemodes, "Assasination")
|
||||||
|
|
||||||
if config.traitorShipEnabled then
|
if config.traitorShipEnabled then
|
||||||
traitormod.spawnTraitorShipAndHide()
|
if Game.GetRespawnSub() == nil then
|
||||||
|
Game.SendMessage("TraitorMod Warning: Traitor Ship enabled but respawn shuttle disabled!", 1)
|
||||||
|
else
|
||||||
|
traitormod.spawnTraitorShipAndHide()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -486,6 +492,14 @@ Hook.Add("chatMessage", "chatcommands", function(msg, client)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if msg == "!help" then
|
||||||
|
|
||||||
|
|
||||||
|
traitormod.sendTraitorMessage("\nCommands\n!help\n!traitor\n!traitors\n!percentage\n!percentages\n!toggletraitorship", client)
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
if util.stringstarts(msg, "!traitor") then
|
if util.stringstarts(msg, "!traitor") then
|
||||||
if util.characterIsTraitor(client.Character, traitormod.roundtraitors) then
|
if util.characterIsTraitor(client.Character, traitormod.roundtraitors) then
|
||||||
local msg = "You are a traitor. "
|
local msg = "You are a traitor. "
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ Hook.Add("roundEnd", "traitorShipRemove", function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
traitormod.spawnTraitorShipAndHide = function()
|
traitormod.spawnTraitorShipAndHide = function()
|
||||||
|
|
||||||
Game.SetRespawnSubTeam(2)
|
Game.SetRespawnSubTeam(2)
|
||||||
Game.DispatchRespawnSub()
|
Game.DispatchRespawnSub()
|
||||||
|
|
||||||
@@ -115,6 +116,8 @@ traitormod.traitorShipRoundStart = function(maxplayers)
|
|||||||
mess = mess .. "\"" .. va .. "\" "
|
mess = mess .. "\"" .. va .. "\" "
|
||||||
end
|
end
|
||||||
|
|
||||||
|
mess = mess .. "\n\n(You can type in local chat !traitor, to check this information again.)"
|
||||||
|
|
||||||
Game.Log(value.name .. " Was assigned to be Ship traitor", 6)
|
Game.Log(value.name .. " Was assigned to be Ship traitor", 6)
|
||||||
|
|
||||||
local cl = util.clientChar(value)
|
local cl = util.clientChar(value)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ config.traitorSpawnDelay = 60
|
|||||||
config.nextMissionDelay = 60
|
config.nextMissionDelay = 60
|
||||||
|
|
||||||
config.traitorShipEnabled = true -- set this to false for the respawn shuttles to work
|
config.traitorShipEnabled = true -- set this to false for the respawn shuttles to work
|
||||||
config.traitorShipChance = 18
|
config.traitorShipChance = 15
|
||||||
config.traitorShipGodModeDistance = 4000
|
config.traitorShipGodModeDistance = 4000
|
||||||
|
|
||||||
config.enableCommunicationsOffline = true
|
config.enableCommunicationsOffline = true
|
||||||
|
|||||||
Reference in New Issue
Block a user