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

Admin/Max level restricting plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 11-21-2011 , 11:02   Admin/Max level restricting plugin
Reply With Quote #1

Superhero Restricter

Description
I got tired of seeing "how to make hero admin only" or "how to put a max level cap on a hero" type threads. Especially since in most cases the user doesn't know enough about coding to be able to modify whatever hero they need to be modified to do that. So to make things simple I made a central plugin to handle both admin only and max level restrictions so the user doesn't have to bother editing their heroes to get the same effect.

Configuration
copy the hero_restrict.ini to your amxmodx/configs/shero directory and list all the heroes you wish to restrict within.

**WARNING**
this plugin requires 3 changes to be made to the core superhero plugin to work(why I've been reluctant to make a separate thread like this before). To make things simple I'm attaching an edited version of the current superhero package(1.2.0.16) with the changes already made. If you prefer to make the changes yourself, you can find direction's commented at the top in the sh_restricter.sma.

On another note, this plugin is designed to make use of the superhero version 1.2.0 and up api, so it won't work with superhero 1.18 or other previous version's.

p.s. for those of you that already tried previous version's of this plugin, I believe I fixed the drop issue and level issue that I was having trouble with before.
Attached Files
File Type: sma Get Plugin or Get Source (sh_restricter.sma - 1361 views - 9.6 KB)
File Type: ini hero_restrict.ini (874 Bytes, 550 views)
File Type: sma Get Plugin or Get Source (superheromod.sma - 1304 views - 188.5 KB)
__________________
If at first you don't succeed, then skydiving isn't for you.

Last edited by G-Dog; 11-21-2011 at 11:06.
G-Dog is offline
Send a message via AIM to G-Dog
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 11-22-2011 , 04:20   Re: Admin/Max level restricting plugin
Reply With Quote #2

200 + for this, looks really great, if people find it there will probably be less stupid posts, and a lot easier for "regular" server operators to make better servers. Just sucks I went through them damn heroes and edited them one by one now xD
__________________
The Art of War is offline
dakco
Zero Posts
Join Date: Nov 2011
Old 11-24-2011 , 03:24   Re: Admin/Max level restricting plugin
Reply With Quote #3

Very good? , open the say no safety oh.
__________________
China Dakco is a professional LED supplier, its flagship product for led display,led screen ,led board
dakco is offline
loztdevil
Member
Join Date: Oct 2011
Location: The Netherlands
Old 01-12-2012 , 13:50   Re: Admin/Max level restricting plugin
Reply With Quote #4

I have tryed to compile it but i get these errors:
Quote:
/tmp/textE5Ou8z.sma(907) : error 027: invalid character constant
/tmp/textE5Ou8z.sma(4972) : error 027: invalid character constant

2 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textE5Ou8z.amx (compile failed).
Look at the attachment how i did the sma file.
Attached Files
File Type: sma Get Plugin or Get Source (superheromod.sma - 923 views - 188.3 KB)
loztdevil is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-12-2012 , 18:47   Re: Admin/Max level restricting plugin
Reply With Quote #5

G-dog already uploaded the core plugin. All your have to do is download it and replace it with your current one and it should work.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
loztdevil
Member
Join Date: Oct 2011
Location: The Netherlands
Old 01-14-2012 , 10:55   Re: Admin/Max level restricting plugin
Reply With Quote #6

it doesnt work on my server and i have superhero mod 1.2.0
loztdevil is offline
loztdevil
Member
Join Date: Oct 2011
Location: The Netherlands
Old 01-14-2012 , 11:18   Re: Admin/Max level restricting plugin
Reply With Quote #7

okay i got it working but now i get this error:
Quote:
[AMXX] Plugin ("sh_restricter.amxx") is setting itself as failed.
[AMXX] Plugin says: No heros listed in config, SUPERHERO Restrictor turning itself off
But i got heroes in my list take a look.
Attached Files
File Type: ini hero_restrict.ini (900 Bytes, 347 views)
loztdevil is offline
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 01-14-2012 , 12:07   Re: Admin/Max level restricting plugin
Reply With Quote #8

in the config ; signifies that the line is a comment so it doesn't get read by mistake
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
loztdevil
Member
Join Date: Oct 2011
Location: The Netherlands
Old 01-14-2012 , 12:31   Re: Admin/Max level restricting plugin
Reply With Quote #9

and how do i do that?
loztdevil is offline
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 01-14-2012 , 15:27   Re: Admin/Max level restricting plugin
Reply With Quote #10

Code:
;!B
;Deadbuster Sephiroth
-->
Code:
!b
Deadbuster Sephiroth
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
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 09:06.


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