Recoded IsClientPlayer, renamed to IsClientValid, replaced

GetMaxClients() with maxclients
Ignore diff for zhp.inc and spawnprotect.inc
This commit is contained in:
Greyscale
2009-04-16 03:57:46 +02:00
parent f39570205e
commit 872e41e6d2
14 changed files with 394 additions and 385 deletions

View File

@ -23,7 +23,7 @@ stock ZR_PrintToChat(client, any:...)
{
decl String:phrase[192];
if (client)
if (ZRIsValidClient(client))
{
SetGlobalTransTarget(client);
@ -204,11 +204,13 @@ stock ZR_PrintToAdminChat(String:message[])
{
decl String:buffer[256];
Format(buffer, sizeof(buffer), "[ZR] %s", message);
for (new client = 1; client < maxclients; client++)
// x = client index.
for (new x = 1; x < MaxClients; x++)
{
if (IsClientConnected(client) && IsClientInGame(client) && GetAdminFlag(GetUserAdmin(client), Admin_Generic))
if (IsClientInGame(x) && ZRIsClientAdmin(x))
{
PrintToChat(client, buffer);
PrintToChat(x, buffer);
}
}
}