From abf57e24695953996193d19f3357e6a6bba517a1 Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Mon, 22 Feb 2016 10:01:52 +0100 Subject: [PATCH] Fixed player locks making use of admin.lockPlayer and admin.unlockPlayer --- luascripts/admin/admin.lua | 10 +++++----- luascripts/commands/admin/plock.lua | 2 +- luascripts/commands/admin/punlock.lua | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/luascripts/admin/admin.lua b/luascripts/admin/admin.lua index 6d3d085..8c189b2 100644 --- a/luascripts/admin/admin.lua +++ b/luascripts/admin/admin.lua @@ -36,7 +36,7 @@ function admin.isVoiceMuted(clientId) end function admin.isPlayerLocked(clientId) - if stats.get(clientId, "playerLock") then + if stats.get(clientId, "teamLock") then return true end @@ -51,12 +51,12 @@ function admin.unmuteVoice(clientId) stats.set(clientId, "voiceMute", false) end -function admin.lockTeam(clientId, team) - stats.set(clientId, "voiceMute", length) +function admin.lockPlayer(clientId) + stats.set(clientId, "teamLock", true) end -function admin.unlockTeam(clientId) - stats.set(clientId, "voiceMute", length) +function admin.unlockPlayer(clientId) + stats.set(clientId, "teamLock", false) end function admin.updatePlayer(clientId) diff --git a/luascripts/commands/admin/plock.lua b/luascripts/commands/admin/plock.lua index a3b56fd..6e5d71a 100644 --- a/luascripts/commands/admin/plock.lua +++ b/luascripts/commands/admin/plock.lua @@ -57,7 +57,7 @@ function commandPlayerLock(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "chat \"^dplock: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been locked to his team\";") - stats.set(cmdClient, "playerLock", true) + admin.lockPlayer(cmdClient) return true end diff --git a/luascripts/commands/admin/punlock.lua b/luascripts/commands/admin/punlock.lua index 2cbb898..af40536 100644 --- a/luascripts/commands/admin/punlock.lua +++ b/luascripts/commands/admin/punlock.lua @@ -49,7 +49,7 @@ function commandPlayerUnlock(clientId, cmdArguments) et.trap_SendConsoleCommand(et.EXEC_APPEND, "chat \"^dpunlock: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9has been unlocked from his team\";") - stats.set(cmdClient, "playerLock", false) + admin.unlockPlayer(cmdClient) return true end