Raised This Month: $32 Target: $400
 8% 

[HELP] Any way to check admin group?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 05-15-2018 , 11:40   [HELP] Any way to check admin group?
Reply With Quote #1

Hi guys.
Is there any way to store the admin group as a string?

I want to make a plugin compatible with vip core by r1ko.
If Admin Group contains custom flag o the clan tag of the vip will be VIP ADMIN
If contains flag q the clan tag will be VIP MODERATOR

Is there any way how can i check if the client is admin or not?

Thanks!
kratoss1812 is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 05-15-2018 , 11:45   Re: [HELP] Any way to check admin group?
Reply With Quote #2

Quote:
Originally Posted by kratoss1812 View Post
Hi guys.
Is there any way to store the admin group as a string?

I want to make a plugin compatible with vip core by r1ko.
If Admin Group contains custom flag o the clan tag of the vip will be VIP ADMIN
If contains flag q the clan tag will be VIP MODERATOR

Is there any way how can i check if the client is admin or not?

Thanks!
CheckCommandAccess(int client, const char[] command, int flags, bool override_only=false)

Set the override_only boolean to true if you only want to check for the flag and not the command access.

Last edited by ThatKidWhoGames; 05-15-2018 at 11:45.
ThatKidWhoGames is offline
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 05-15-2018 , 11:53   Re: [HELP] Any way to check admin group?
Reply With Quote #3

Quote:
Originally Posted by ThatKidWhoGames View Post
CheckCommandAccess(int client, const char[] command, int flags, bool override_only=false)

Set the override_only boolean to true if you only want to check for the flag and not the command access.
How I can use it in an if statement? I'm a beginner
kratoss1812 is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 05-15-2018 , 18:36   Re: [HELP] Any way to check admin group?
Reply With Quote #4

Quote:
Originally Posted by kratoss1812 View Post
How I can use it in an if statement? I'm a beginner
PHP Code:
if (CheckCommandAccess(client"sm_admin"ADMFLAG_GENERIC))
{
    
// Code here


Last edited by ThatKidWhoGames; 05-15-2018 at 18:37.
ThatKidWhoGames is offline
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 05-16-2018 , 11:13   Re: [HELP] Any way to check admin group?
Reply With Quote #5

Quote:
Originally Posted by ThatKidWhoGames View Post
PHP Code:
if (CheckCommandAccess(client"sm_admin"ADMFLAG_GENERIC))
{
    
// Code here


Thanks <3
kratoss1812 is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 05-16-2018 , 11:19   Re: [HELP] Any way to check admin group?
Reply With Quote #6

Not a problem, edit the thread and mark it as solved so others know that your issue has been resolved. Have a good one!
ThatKidWhoGames is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode