From 9840feb9a7d0a00f408b1907c6c0d671a69f100d Mon Sep 17 00:00:00 2001 From: dogan Date: Thu, 15 Oct 2020 22:41:17 +0200 Subject: [PATCH] Leader2: fix whitelist exploit --- Leader2/scripting/Leader2.sp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Leader2/scripting/Leader2.sp b/Leader2/scripting/Leader2.sp index 3cb375c8..1fda948d 100644 --- a/Leader2/scripting/Leader2.sp +++ b/Leader2/scripting/Leader2.sp @@ -739,12 +739,12 @@ public Action Leader(int client, int args) } if(!IsPlayerAlive(client)) { - ReplyToCommand(client, "[SM] The target has to be alive!"); + ReplyToCommand(client, "[SM] You have to be alive!"); return Plugin_Handled; } else if(ZR_IsClientZombie(client)) { - ReplyToCommand(client, "[SM] The target has to be a human!"); + ReplyToCommand(client, "[SM] You have to be a human!"); return Plugin_Handled; } else @@ -770,7 +770,17 @@ public Action Leader(int client, int args) LeaderMenu(client); return Plugin_Handled; } - if(IsPlayerAlive(client)) + if(!IsPlayerAlive(client)) + { + ReplyToCommand(client, "[SM] You have to be alive!"); + return Plugin_Handled; + } + else if(ZR_IsClientZombie(client)) + { + ReplyToCommand(client, "[SM] You have to be a human!"); + return Plugin_Handled; + } + else { SetLeader(client); PrintToChatAll("[SM] %N is the new leader!", client); @@ -778,11 +788,6 @@ public Action Leader(int client, int args) LeaderMenu(client); return Plugin_Handled; } - else - { - ReplyToCommand(client, "[SM] The target has to be alive!"); - return Plugin_Handled; - } } if(client == leaderClient) {