From 879446ac7c76f6dd616a158a472830e4982d9018 Mon Sep 17 00:00:00 2001 From: Greyscale Date: Fri, 17 Apr 2009 12:20:01 +0200 Subject: [PATCH] Modified ZRIsClientAdmin function for consistency. --- src/zr/zombiereloaded.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/zr/zombiereloaded.inc b/src/zr/zombiereloaded.inc index b569c5b..61286c3 100644 --- a/src/zr/zombiereloaded.inc +++ b/src/zr/zombiereloaded.inc @@ -312,12 +312,17 @@ ZRTeamHasClients(team = -1) */ bool:ZRIsClientAdmin(client) { - // Check to make sure client is valid and has the Admin_Generic SourceMod admin flag. - if (ZRIsValidClient(client) && GetAdminFlag(GetUserAdmin(client), Admin_Generic)) + // If index is invalid, then stop. + if (!ZRIsValidClient(client)) { - return true; + return false; + } + // If client doesn't have the Admin_Generic flag, then stop. + if (!GetAdminFlag(GetUserAdmin(client), Admin_Generic)) + { + return false; } - // Client is not an admin. - return false; + // Client is an admin. + return true; }