Cool! Going to try it
Edit: All working!
Defend (spanish sv)
Follow me (spanish sv)
Bugs: If you are an admin, the plugin doesn't care if you are zombie or not... Please set than just "HUMAN ADMINS" can use the !leader because "ZOMBIE ADMINS" can type !leader and they get the leader being zombie...
i know i said the bug at the top but well i fixed it in my sv making it this way :v
PHP Code:
public Action Leader(int client, int args)
{
if(CheckCommandAccess(client, "sm_admin", ADMFLAG_GENERIC, false) && !ZR_IsClientZombie(client))
{
if(args == 1)
{
char arg1[65];
GetCmdArg(1, arg1, sizeof(arg1));
int target = FindTarget(client, arg1, false, false);
if (target == -1)
{
return Plugin_Handled;
}
if(target == leaderClient)
{
LeaderMenu(target);
}
else
{
if(IsPlayerAlive(target))
{
SetLeader(target);
PrintToChatAll("[SM] %N is the new leader!", target);
PrintToChat(target, "[SM] You are now the leader! Type !leader to open up the leader menu.");
LeaderMenu(target);
}
else
{
ReplyToCommand(client, "[SM] The target has to be alive!");
}
}
}
else if(args == 0)
{
if(client == leaderClient)
{
LeaderMenu(client);
return Plugin_Handled;
}
if(IsPlayerAlive(client))
{
SetLeader(client);
PrintToChatAll("[SM] %N is the new leader!", client);
PrintToChat(client, "[SM] You are now the leader! Type !leader to open up the leader menu.");
LeaderMenu(client);
}
else
{
ReplyToCommand(client, "[SM] The target has to be alive!");
}
}
else
{
ReplyToCommand(client, "[SM] Usage: sm_leader <optional: client|#userid>");
}
}
else if(CheckCommandAccess(client, "sm_admin", ADMFLAG_GENERIC, false) && ZR_IsClientZombie(client))
{
PrintToChat(client, "[SM] You are admin but you are not human, do not try to abuse.");
}
if(client == leaderClient)
{
LeaderMenu(client);
}
return Plugin_Handled;
}


__________________