Raised This Month: $ Target: $400
 0% 

Admin access


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ekenn123
Junior Member
Join Date: Feb 2008
Old 08-14-2010 , 15:46   Admin access
Reply With Quote #1

Hello! I could use a hand.

I need help to add "vip/admin access" to my plugin(not scripted by me entirely) so when people want to bring the menu up they need to have like "be" access or something Let's say they type /shop, then only the people who have "be" access gets the menu.

I hope you understood! Thanks
ekenn123 is offline
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-14-2010 , 16:31   Re: Admin access
Reply With Quote #2

PHP Code:
if(get_user_flags(id) == ADMIN_IMMUNITY
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
ekenn123
Junior Member
Join Date: Feb 2008
Old 08-14-2010 , 16:32   Re: Admin access
Reply With Quote #3

Quote:
Originally Posted by N A V E N View Post
PHP Code:
if(get_user_flags(id) == ADMIN_IMMUNITY
Where should I put this? more of a tutorial please
ekenn123 is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 08-14-2010 , 17:14   Re: Admin access
Reply With Quote #4

in plugin_init() u put something like this:

PHP Code:
register_clcmd("say /shop","openShopMenu",ADMIN_SLAY,"Vip Menu"); 
and in your openShopMenu

PHP Code:
public openShopMenu(id,lvl,cid)
{
    if(!
cmd_access(id,lvl,cid,1))
        return 
PLUGIN_HANDLED;

    
//your code here

is this needed.

every ADMIN with the flag "e" = slay or slap, have access to this menu

Last edited by platzpatrone; 08-14-2010 at 17:20.
platzpatrone is offline
ekenn123
Junior Member
Join Date: Feb 2008
Old 08-14-2010 , 17:17   Re: Admin access
Reply With Quote #5

Quote:
Originally Posted by platzpatrone View Post
in plugin_init() u can put something like this:

PHP Code:
register_clcmd("say /shop","openShopMenu",ADMIN_SLAY,"Vip Menu"); 
every ADMIN with the flag "e" = slay or slap, have access to this menu
thanks
ekenn123 is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 08-14-2010 , 17:21   Re: Admin access
Reply With Quote #6

read my post again, i forgot to add the check
platzpatrone is offline
ekenn123
Junior Member
Join Date: Feb 2008
Old 08-14-2010 , 17:28   Re: Admin access
Reply With Quote #7

Quote:
Originally Posted by platzpatrone View Post
read my post again, i forgot to add the check
thats why it had no function lol, but hm.. I don't want my VIP's able to slay people Isn't there anything else thats make em unique only.. like a small function they can do? Just to make them different from the rest

My plan was to make a shop for VIP's so they can buy AWP/Deagle in HnS, then I was planning to add so you can buy VIP for XP
ekenn123 is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 08-14-2010 , 17:54   Re: Admin access
Reply With Quote #8

Quote:
Originally Posted by N A V E N View Post
PHP Code:
if(get_user_flags(id) == ADMIN_IMMUNITY
Code:
if(get_user_flags(id) & ADMIN_IMMUNITY)
Vechta is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 08-14-2010 , 18:04   Re: Admin access
Reply With Quote #9

Quote:
Originally Posted by ekenn123 View Post
thats why it had no function lol, but hm.. I don't want my VIP's able to slay people Isn't there anything else thats make em unique only.. like a small function they can do? Just to make them different from the rest

My plan was to make a shop for VIP's so they can buy AWP/Deagle in HnS, then I was planning to add so you can buy VIP for XP
then still get them instead of ADMIN_SLAY the ADMIN_LEVEL_H (flag -> t) or something else
platzpatrone is offline
ekenn123
Junior Member
Join Date: Feb 2008
Old 08-14-2010 , 18:12   Re: Admin access
Reply With Quote #10

Quote:
Originally Posted by platzpatrone View Post
then still get them instead of ADMIN_SLAY the ADMIN_LEVEL_H (flag -> t) or something else
What does T ?
ekenn123 is offline
Reply



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 21:51.


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