Modified ZRIsClientAdmin function for consistency.
This commit is contained in:
parent
ecc9cf5167
commit
879446ac7c
@ -312,12 +312,17 @@ ZRTeamHasClients(team = -1)
|
|||||||
*/
|
*/
|
||||||
bool:ZRIsClientAdmin(client)
|
bool:ZRIsClientAdmin(client)
|
||||||
{
|
{
|
||||||
// Check to make sure client is valid and has the Admin_Generic SourceMod admin flag.
|
// If index is invalid, then stop.
|
||||||
if (ZRIsValidClient(client) && GetAdminFlag(GetUserAdmin(client), Admin_Generic))
|
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.
|
// Client is an admin.
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user