Raised This Month: $ Target: $400
 0% 

Flag allows to use plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raiko999
Junior Member
Join Date: Nov 2009
Old 11-30-2009 , 14:00   Flag allows to use plugin
Reply With Quote #1

So I got an plugin, Golden AK for cs 1.6. It allows you to buy an Golden AK, is you say /goldenak. So what I need, is that only players with admin flag S (ADMIN_LEVEL_G) can buy it. I've been searching around and I think I have to add this to somewhere in the plugin:
Code:
if( get_user_flags(/goldenak) & ADMIN_LEVEL_G)
Can anyone tell me, is this correct line and where exactly I need to put this...
Plugin it self: http://forums.alliedmods.net/showthread.php?t=92393


Hope someone can help.
raiko999 is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 11-30-2009 , 14:03   Re: Flag allows to use plugin
Reply With Quote #2

Just add this
if(!(get_user_flags(id) & ADMIN_LEVEL_G)) return PLUGIN_HANDLED
at the top of CmdBuyAk.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
raiko999
Junior Member
Join Date: Nov 2009
Old 11-30-2009 , 14:11   Re: Flag allows to use plugin
Reply With Quote #3

Quote:
Originally Posted by DarkGod View Post
Just add this
if(!(get_user_flags(id) & ADMIN_LEVEL_G)) return PLUGIN_HANDLED
at the top of CmdBuyAk.
Hmm, it wont let me compile then. Could you add it yourself and upload .sma file then?
raiko999 is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 11-30-2009 , 14:14   Re: Flag allows to use plugin
Reply With Quote #4

Sure.
Attached Files
File Type: sma Get Plugin or Get Source (GoldenAk.sma - 646 views - 6.4 KB)
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
raiko999
Junior Member
Join Date: Nov 2009
Old 11-30-2009 , 14:22   Re: Flag allows to use plugin
Reply With Quote #5

Quote:
Originally Posted by DarkGod View Post
Sure.
Thank you so much
raiko999 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 13:42.


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