Merge branch 'master' of github.com:Jackzmc/sourcemod-plugins

This commit is contained in:
Jackzie 2022-02-17 10:24:11 -06:00
commit 5b60b8a95f
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
34 changed files with 2116 additions and 236 deletions

View file

@ -1,6 +1,6 @@
/*
* Left 4 DHooks Direct - Stock Functions
* Copyright (C) 2021 Silvers
* Copyright (C) 2022 Silvers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -827,7 +827,10 @@ stock int GetAnyRandomClient()
}
if( aClients.Length > 0 )
{
SetRandomSeed(GetGameTickCount());
client = aClients.Get(GetRandomInt(0, aClients.Length - 1));
}
delete aClients;
@ -866,7 +869,7 @@ stock int Local_GetRandomClient(int team, int alive = -1, int bots = -1)
for( int i = 1; i <= MaxClients; i++ )
{
if( IsClientInGame(i) && GetClientTeam(i) == team && (alive == -1 || IsPlayerAlive(i) == view_as<bool>(alive)) && (bots == -1 || IsFakeClient(i) == view_as<bool>(alive)) )
if( IsClientInGame(i) && GetClientTeam(i) == team && (alive == -1 || IsPlayerAlive(i) == view_as<bool>(alive)) && (bots == -1 || IsFakeClient(i) == view_as<bool>(bots)) )
{
aClients.Push(i);
}
@ -875,7 +878,10 @@ stock int Local_GetRandomClient(int team, int alive = -1, int bots = -1)
int client;
if( aClients.Length > 0 )
{
SetRandomSeed(GetGameTickCount());
client = aClients.Get(GetRandomInt(0, aClients.Length - 1));
}
delete aClients;