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
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)

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\";")
stats.set(cmdClient, "playerLock", true)
admin.lockPlayer(cmdClient)
return true
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\";")
stats.set(cmdClient, "playerLock", false)
admin.unlockPlayer(cmdClient)
return true
end