Fixed player locks making use of admin.lockPlayer and admin.unlockPlayer

This commit is contained in:
Timo Smit 2016-02-22 10:01:52 +01:00
parent 0764a16046
commit abf57e2469
3 changed files with 7 additions and 7 deletions

View file

@ -36,7 +36,7 @@ function admin.isVoiceMuted(clientId)
end end
function admin.isPlayerLocked(clientId) function admin.isPlayerLocked(clientId)
if stats.get(clientId, "playerLock") then if stats.get(clientId, "teamLock") then
return true return true
end end
@ -51,12 +51,12 @@ function admin.unmuteVoice(clientId)
stats.set(clientId, "voiceMute", false) stats.set(clientId, "voiceMute", false)
end end
function admin.lockTeam(clientId, team) function admin.lockPlayer(clientId)
stats.set(clientId, "voiceMute", length) stats.set(clientId, "teamLock", true)
end end
function admin.unlockTeam(clientId) function admin.unlockPlayer(clientId)
stats.set(clientId, "voiceMute", length) stats.set(clientId, "teamLock", false)
end end
function admin.updatePlayer(clientId) function admin.updatePlayer(clientId)

View file

@ -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\";") 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 return true
end end

View file

@ -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\";") 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 return true
end end