Better stock to get random client:
PHP Code:
stock int GetAnyRandomClient()
{
int client;
ArrayList aClients = new ArrayList();
for( int i = 1; i <= MaxClients; i++ )
{
if( IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i) )
{
aClients.Push(i);
}
}
if( aClients.Length > 0 )
client = aClients.Get(GetRandomInt(0, aClients.Length - 1));
delete aClients;
return client;
}
Replace "OnClientPostAdminCheck" with "OnClientPutInServer". Otherwise when the server loses connection with Steam they won't be validated and the client won't be hooked.
Change "int Insider[MAXPLAYERS+1] = {0, ...};" to "int Insider[MAXPLAYERS+1]" the default value when the variable is initialized is already 0.
All your plugins custom functions don't need public e.g. "public bool IsPlayerFalling" should just be "bool IsPlayerFalling"
__________________