Raised This Month: $51 Target: $400
 12% 

Making a plugin for a specific admin flag?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tym
Junior Member
Join Date: Nov 2012
Old 11-30-2012 , 20:35   Making a plugin for a specific admin flag?
Reply With Quote #1

So im kinda new to this, tried to teach myself, but now I am abit stuck, I want to only give napalm grenades to the admins (me and my friends) and i have searched, but the only topic I can find says to use Sourcemod override, but I don't want to do this, say i want only people who have custom flag "o" to use "napalm.smx" how would I do this?

Thanks in advance!
Tym is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 11-30-2012 , 21:02   Re: Making a plugin for a specific admin flag?
Reply With Quote #2

Why don't you want to use admin_overrides.cfg?

Last edited by Sreaper; 11-30-2012 at 21:03.
Sreaper is offline
Tym
Junior Member
Join Date: Nov 2012
Old 11-30-2012 , 21:17   Re: Making a plugin for a specific admin flag?
Reply With Quote #3

Quote:
Originally Posted by Sreaper View Post
Why don't you want to use admin_overrides.cfg?
I would like to but I don't actually know how, i.e. what should i enter?
Tym is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 11-30-2012 , 21:52   Re: Making a plugin for a specific admin flag?
Reply With Quote #4

It should look something like this.

Code:
Overrides
{
"sm_slay" "o"
}
That would restrict the command "sm_slay" to work only for people who have the "o" flag. (Note you can choose to have multiple flags).
If you want a command to be usable by everyone, you can just leave the second part as empty quotes. ""

For a list of available flags you can refer to this.

Last edited by Sreaper; 11-30-2012 at 21:56.
Sreaper is offline
Tym
Junior Member
Join Date: Nov 2012
Old 12-01-2012 , 05:51   Re: Making a plugin for a specific admin flag?
Reply With Quote #5

Right, my only other (and last) problem is how do I find what command i need to enter for this plugin?

https://forums.alliedmods.net/showthread.php?t=59642

Thanks alot for your time mate, really appreciate it, if I ever win the lottery I'll give you some
Tym is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-01-2012 , 08:44   Re: Making a plugin for a specific admin flag?
Reply With Quote #6

In order for admin_overrides to work, the plugin has to support it. I've updated the plugin to support admin_overrides, and added a couple other features. There is an example of how to use the overrides in my post here: https://forums.alliedmods.net/showth...t=59642&page=5
__________________
Sheepdude is offline
Tym
Junior Member
Join Date: Nov 2012
Old 12-01-2012 , 09:05   Re: Making a plugin for a specific admin flag?
Reply With Quote #7

Quote:
Originally Posted by Sheepdude View Post
In order for admin_overrides to work, the plugin has to support it. I've updated the plugin to support admin_overrides, and added a couple other features. There is an example of how to use the overrides in my post here: https://forums.alliedmods.net/showth...t=59642&page=5
I think i have set it up write, but it still works so anyone can use napalm grenades, by the way thank you so much for do this for me You can have a share of my lotto winnings some day also. But I don't understand what I have done wrong?
Tym is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-01-2012 , 09:27   Re: Making a plugin for a specific admin flag?
Reply With Quote #8

I dunno brah, works for me.

I set permission in admin_overrides to "o", gave myself no admin, and couldn't use napalm.
Gave myself the "c" admin flag, and couldn't use napalm.
Gave myself the "o" admin flag, and I could use napalm.
Gave myself the "z" admin flag, and I could use napalm.

For starters, what game are you trying to use this with? Did you restart your server (or at least change the map) after installing the plugin?

Use sm_cvar to check the following convars in game, and tell me what their values are (or if the game couldn't find them):

sm_napalm_nades_on
sm_napalm_nades_adminonly

Also, can you post your admin_overrides.cfg file?
__________________
Sheepdude is offline
Tym
Junior Member
Join Date: Nov 2012
Old 12-01-2012 , 09:32   Re: Making a plugin for a specific admin flag?
Reply With Quote #9

Uh, Im not quite sure how to check the sm_cvars but here is my cfg. If I have fuc'd it up sorry :£
Attached Files
File Type: cfg admin_overrides.cfg (847 Bytes, 122 views)
Tym is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-01-2012 , 09:36   Re: Making a plugin for a specific admin flag?
Reply With Quote #10

Yep you done goofed, you have two open brackets ( looks like: "{" ). Delete one of them.
__________________
Sheepdude 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 03:09.


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