added native to leader to get if a client if one of the possible leaders. added to mapchooser that random picked maps respect cooldowns as well. changed so leaders and admins skip all cooldowns and restrictions

This commit is contained in:
2024-07-26 18:33:39 +02:00
parent 8b94b0fc45
commit 0115f8bfc2
4 changed files with 68 additions and 117 deletions
+9 -1
View File
@@ -1439,6 +1439,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
{
CreateNative("Leader_CurrentLeader", Native_CurrentLeader);
CreateNative("Leader_SetLeader", Native_SetLeader);
CreateNative("Leader_Is", Native_IsPossibleLeader);
return APLRes_Success;
}
@@ -1457,6 +1458,13 @@ public int Native_SetLeader(Handle plugin, int numParams)
{
SetLeader(GetNativeCell(1));
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public int Native_IsPossibleLeader(Handle plugin, int numParams)
{
return IsPossibleLeader(GetNativeCell(1));
}
//----------------------------------------------------------------------------------------------------
// Purpose:
@@ -1595,4 +1603,4 @@ bool TracePlayerAngles(int client, float vecResult[3])
stock bool TraceEntityFilter_FilterPlayers(int entity, int contentsMask)
{
return entity > MaxClients;
}
}