Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jlillis committed Jul 17, 2024
2 parents bc9fafe + a01ec8a commit 1b05223
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions [gamemodes]/[deathmatch]/deathmatch/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ local defaults = {
}

--
-- startGamemodeMode: initializes the Gamemode gamemode
-- startGamemodeMode: initializes the gamemode
--
local function startGamemodeMode()
local function startGamemode()
-- update game state
setElementData(resourceRoot, "gameState", GAME_WAITING)
-- set default player state on gamemode start (clients will report in when ready)
for _, player in ipairs(getElementsByType("player")) do
_playerStates[player] = PLAYER_JOINED
end
end
addEventHandler("onGamemodeStart", resourceRoot, startGamemodeMode)
addEventHandler("onGamemodeStart", resourceRoot, startGamemode)

--
-- stopGamemodeMode: cleans up the Gamemode gamemode
-- stopGamemodeMode: cleans up the gamemode
--
local function stopGamemodeMode()
local function stopGamemode()
-- cleanup player score data, make sure scoreboard isn't forced
for _, player in ipairs(getElementsByType("player")) do
removeElementData(player, "Score")
removeElementData(player, "Rank")
end
end
addEventHandler("onGamemodeStop", resourceRoot, stopGamemodeMode)
addEventHandler("onGamemodeStop", resourceRoot, stopGamemode)

--
-- startGamemodeMap: initializes a Gamemode map
-- startGamemodeMap: initializes a gamemode map
--
local function startGamemodeMap(resource)
-- load map settings
Expand Down Expand Up @@ -79,7 +79,7 @@ end
addEventHandler("onGamemodeMapStart", root, startGamemodeMap)

--
-- stopGamemodeMap: cleans up a Gamemode map
-- stopGamemodeMap: cleans up a gamemode map
--
local function stopGamemodeMap(resource)
-- end the round
Expand Down

0 comments on commit 1b05223

Please sign in to comment.