forked from UNLOZE/sm-plugins
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user