Skip to content

Commit

Permalink
Фиксы ошибок в режимах
Browse files Browse the repository at this point in the history
  • Loading branch information
lex128 committed Aug 15, 2017
1 parent 085a7ce commit 09cb49a
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion modes/arena.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
spawnCounter = {}
local spawnCounter = {}
function TeamDeathMatch_onResourceStart (resource)
createTacticsMode ("arena", {timelimit="10:00", spawnprotect="0:05"})
end
Expand Down
4 changes: 2 additions & 2 deletions modes/bang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
ProjectBang_vehicles = {}
spawnCounter = {}
local ProjectBang_vehicles = {}
local spawnCounter = {}
function ProjectBang_onResourceStart(resource)
createTacticsMode("bang",{timelimit="10:00",player_radarblip="all|none,team,all"})
end
Expand Down
4 changes: 2 additions & 2 deletions modes/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
captureTimer = false
spawnCounter = {}
local captureTimer = false
local spawnCounter = {}
function AttackDefend_onResourceStart(resource)
createTacticsMode("base",{timelimit="15:00",capturing="0:20",def_veh_jacking="false",spawnprotect="0:15"})
end
Expand Down
6 changes: 3 additions & 3 deletions modes/bomb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
spawnCounter = {}
teamPlanted = false
playerPlanted = false
local spawnCounter = {}
local teamPlanted = false
local playerPlanted = false
function BombMatch_onResourceStart(resource)
createTacticsMode("bomb",{timelimit="15:00",bombtimer="1:50",planting="0:05",defusing="0:10",spawnprotect="0:05"})
end
Expand Down
8 changes: 4 additions & 4 deletions modes/cp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
captureTimer = {}
captureBase = {}
captureTeam = {}
spawnCounter = {}
local captureTimer = {}
local captureBase = {}
local captureTeam = {}
local spawnCounter = {}
function ControlPoints_onResourceStart(resource)
createTacticsMode("cp",{timelimit="7:30",capturing_1="0:15",capturing_2="0:12",capturing_more="0:10",spawnprotect="0:03"})
end
Expand Down
2 changes: 1 addition & 1 deletion modes/ctf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
spawnCounter = {}
local spawnCounter = {}
local flagRespawn = {}
local teamFlag = {}
local playerFlag = {}
Expand Down
2 changes: 1 addition & 1 deletion modes/derby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local playerVehicle = {}
local startTick = 0
local pauseTick = 0
local replaceModels = {nitro = 2221,repair = 2222,vehiclechange = 2223}
finishCounter = {}
local finishCounter = {}
function DestructionDerby_onResourceStart(resource)
createTacticsMode("derby",{timelimit="30:00",type_play="individual|individual,teamplay",disable_weapons="false",player_radarblip="all|none,team,all",firewater="false"})
end
Expand Down
14 changes: 9 additions & 5 deletions modes/dm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function DeathMatch_onRoundStart()
local spawnprotect = TimeToSec(getRoundModeSettings("spawnprotect"))
local teamsides = getTacticsData("Teamsides")
for i,player in ipairs(getElementsByType("player")) do
if (getPlayerGameStatus(player,"Status") == "Play" or getElementData(player) == "Loading") then
if getPlayerGameStatus(player) == "Play" or getPlayerGameStatus(player) == "Loading" then
givePlayerProperty(player,"invulnerable",true,spawnprotect*1000)
local team = getPlayerTeam(player)
if (teamsides[team]) then
Expand Down Expand Up @@ -126,8 +126,10 @@ function DeathMatch_onCheckRound(killer,frags)
local fraglimit = tonumber(getRoundModeSettings("fraglimit") or 50)
local players = {}
for i,player in ipairs(getElementsByType("player")) do
local frags = getElementData(player,"Frags") or 0
table.insert(players,{player,frags})
if getPlayerGameStatus(player) == "Play" then
local frags = getElementData(player,"Frags") or 0
table.insert(players,{player,frags})
end
end
table.sort(players,function(a,b) return a[2] > b[2] end)
if (players[1][2] >= fraglimit) then
Expand All @@ -154,8 +156,10 @@ end
function DeathMatch_onRoundTimesup()
local players = {}
for i,player in ipairs(getElementsByType("player")) do
local frags = getElementData(player,"Frags") or 0
table.insert(players,{player,frags})
if getPlayerGameStatus(player) == "Play" then
local frags = getElementData(player,"Frags") or 0
table.insert(players,{player,frags})
end
end
if (#players > 0) then table.sort(players,function(a,b) return a[2] > b[2] end) end
if (#players > 0 and players[1][2] > players[2][2]) then
Expand Down
4 changes: 2 additions & 2 deletions modes/fly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
spawnCounter = {}
playerPlane = {}
local spawnCounter = {}
local playerPlane = {}
function FlyMatch_onResourceStart(resource)
createTacticsMode("fly",{timelimit="10:00",player_radarblip="all|none,team,all",spawn_into_plane="none|none,rustler,hydra,hunter,seasparrow,rc baron"})
end
Expand Down
2 changes: 1 addition & 1 deletion modes/hostage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
spawnCounter = {}
local spawnCounter = {}
function Hostage_onResourceStart(resource)
createTacticsMode("hostage",{timelimit="30:00",hostagekill="false", spawnprotect="0:05"})
end
Expand Down
4 changes: 2 additions & 2 deletions modes/vip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
spawnCounter = {}
playerVIP = nil
local spawnCounter = {}
local playerVIP = nil
function VeryImportantPerson_onResourceStart(resource)
createTacticsMode("vip",{timelimit="10:00", spawnprotect="0:05"})
end
Expand Down
2 changes: 1 addition & 1 deletion modes/zombie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* РАЗРАБОТЧИКИ: Александр Романов <lexr128@gmail.com>
*
****************************************************************************]]
infectionTimer = false
local infectionTimer = false
function ZombieMod_onResourceStart(resource)
createTacticsMode("zombie",{timelimit="10:00",zombie_speed="1.2",zombie_regenerate="5",night="true",spawnprotect="0:15"})
end
Expand Down

0 comments on commit 09cb49a

Please sign in to comment.