AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Flag allows to use plugin (https://forums.alliedmods.net/showthread.php?t=110533)

raiko999 11-30-2009 14:00

Flag allows to use plugin
 
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.

DarkGod 11-30-2009 14:03

Re: Flag allows to use plugin
 
Just add this
if(!(get_user_flags(id) & ADMIN_LEVEL_G)) return PLUGIN_HANDLED
at the top of CmdBuyAk.

raiko999 11-30-2009 14:11

Re: Flag allows to use plugin
 
Quote:

Originally Posted by DarkGod (Post 1003217)
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?

DarkGod 11-30-2009 14:14

Re: Flag allows to use plugin
 
1 Attachment(s)
Sure.

raiko999 11-30-2009 14:22

Re: Flag allows to use plugin
 
Quote:

Originally Posted by DarkGod (Post 1003222)
Sure.

Thank you so much


All times are GMT -4. The time now is 13:42.

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