Modified ZRIsClientAdmin function for consistency.

This commit is contained in:
Greyscale 2009-04-17 12:20:01 +02:00
parent ecc9cf5167
commit 879446ac7c
1 changed files with 10 additions and 5 deletions

View File

@ -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;
}