forked from UNLOZE/sm-plugins
Leader2: fix whitelist exploit
This commit is contained in:
@@ -739,12 +739,12 @@ public Action Leader(int client, int args)
|
|||||||
}
|
}
|
||||||
if(!IsPlayerAlive(client))
|
if(!IsPlayerAlive(client))
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] The target has to be alive!");
|
ReplyToCommand(client, "[SM] You have to be alive!");
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
else if(ZR_IsClientZombie(client))
|
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;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -770,7 +770,17 @@ public Action Leader(int client, int args)
|
|||||||
LeaderMenu(client);
|
LeaderMenu(client);
|
||||||
return Plugin_Handled;
|
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);
|
SetLeader(client);
|
||||||
PrintToChatAll("[SM] %N is the new leader!", client);
|
PrintToChatAll("[SM] %N is the new leader!", client);
|
||||||
@@ -778,11 +788,6 @@ public Action Leader(int client, int args)
|
|||||||
LeaderMenu(client);
|
LeaderMenu(client);
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ReplyToCommand(client, "[SM] The target has to be alive!");
|
|
||||||
return Plugin_Handled;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(client == leaderClient)
|
if(client == leaderClient)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user