Raised This Month: $13 Target: $400
 3% 

Admin Prefixes V4.0 by m0skVi4a ;]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
m0skVi4a
Senior Member
Join Date: May 2011
Location: Rousse, Bulgaria
Old 04-22-2012 , 10:38   Admin Prefixes V4.0 by m0skVi4a ;]
Reply With Quote #1

Plugin Name: Admin Prefixes
Plugin Author: m0skVi4a ;]
Plugin Version: 4.0
Modification: Counter - Strike
Category: Fun Stuff



Description:

With this plugin you can set prefixes to Admins with special flags. Also Admins can put custom prefixes to them or to other players if they want, but only if they have the required flag.


Pictures:



Commands:

Commands:

say /prefix
Toggles Prefix ON or OFF.

say_team /prefix
Toggles Prefix ON or OFF.

ap_reload_prefixes
Reloads Prefixes' file from console without restarting the server.

ap_reload_badprefixes
Reloads Bad Prefixes' file from console without restarting the server.

ap_put "type (f, i, s, n)" "key(Flag, IP, SteamID, name)" "Prefix"
Puts prefix to the key you type if you have the special flag. Or if there is no prefix typed, removes the prefix which the player has.


CVARS:

Code:
"ap_bad_prefixes"	- 	Is the Bad Prefixes option on(1) or off(0).   Default: 1
"ap_listen"		- 	Is the Admin Listen option on(1) or off(0).   Default: 1
"ap_listen_flag"	-	The flag, needed for Listen option.   Default: a
"ap_custom"		-	Is the Custom Prefix option for each Admin is on(1) or off(0).   Default: 1
"ap_custom_flag"	-	The flag, needed for setting custom prefix.   Default: b
"ap_say_characters"	-	Is the Start Say Characters option on(1) or off(0).   Default: 1
"ap_prefix_characters"	-	Is the Checker for Characters in Custom Prefixes' Options on(1) or off(0).   Default: 1

All CVARS are without quotes

Credits:

m0skVi4a ;] - for the idea, making and testing the plugin
SpeeDeeR - for little help with the plugin
Ant1Lamer - for testing the plugin
Vasilii-Zaicev - for testing the plugin


Changelog:

Code:
April 22, 2012   -  V1.0:
	-  First Release
	
May 19, 2012   -  V2.0:
	-  Full optimization
	-  Added Bad Prefixes' file
	-  Added Multi-Lingual file
	-  Added IP and Name support in ap_prefixes.ini
	-  Added Forbidden Say characters
	-  New CVARS for setting the flags for each of the options

May 29, 2012   -  V2.1:
	-  Fixed bug with some say or say_team commands are not executed

January 17, 2013   -  V3.0:
	-  Full optimization
	-  Fixed bug when typing spaces and in tha chat is showing an empty message
	-  SteamID support
	-  Removed nvault
	-  Removed ap_put_player command
	-  ap_put_player command is combined with ap_put command
	-  Removed some CVARs

August 18, 2013   -  V4.0:
	-  Small code changes and little bug fixes
	-  Added Prefux Toggle command
	-  Fixed bug with the supporting of the plugin on AMXX 1.8.2
	-  AMXX 1.8.2 Supprot! 
	-  SQL Version!

Moduls:
PHP Code:
#include <amxmodx>
#include <cstrike> 

Libraries:
PHP Code:
#include <amxmisc>
#include <celltrie>[
#include <sqlx>[ 

Installation
1. Compile the plugin
2. .amxx file goes to plugins dir
3. admin_prefixes.txt goes to data/lang dir
4. ap_prefixes.ini and ap_bad_prefixes.ini go to configs dir and customize them.
5. Add the name of the .amxx file in plugins.ini and start your server


How to set up ap_prefixes.ini
- When adding new prefix, you should conform that you must set the type of the prefix. There are 4 types: type Flag, type IP, type SteamID and type Name, each begins with the character "f", "i", "s" и "n" accordingly.
Here are some examples:
"f" "n" "[PREFIX FLAG]" - this way person with Flag n will have prefix [PREFIX FLAG]
"i" "192.168.1.100" "[PREFIX IP]" - this way person with IP 192.168.1.100 will have prefix [PREFIX IP]
"s" "STEAM_0:1:52985922" "[PREFIX STEAMID]" - this way person with Name m0skVi4a ;] will have prefix [PREFIX NAME]
"n" "m0skVi4a ;]" "[PREFIX NAME]" - this way person with Name m0skVi4a ;] will have prefix [PREFIX NAME]

- If you want to edit who can use the reload command for the plugin's file, open the .sma file and find
PHP Code:
#define FLAG_LOAD ADMIN_CFG 
and edit ADMIN_CFG to the flag that you want (It mustn't be just a character)

- If you want to edit how many prefixes can be loaded, open the .sma file and find
PHP Code:
#define MAX_FLAGS 33 
and edit 33 to any number you want (It is recommended not to be touched)

- If you want the prefix to be coloured, use !g for green, !t for team and !n for noramal colour (It DOES NOT works and with the commands ap_put and ap_put_player)


How to set up ap_bad_prefixes.ini
- If you want to add new Bad Prefix, just write each prefix on new line.
Here is an example:
"[OWNER]"
"[BOSS]"
"[PROSTAK]"
"[IDIOT]"
- that way people who can set Custom Prefixes, can not set these.

- If you want to edit who can use the reload command for the plugin's file, open the .sma file and find
PHP Code:
#define FLAG_LOAD ADMIN_CFG 
and edit ADMIN_CFG to the flag that you want (It mustn't be just a character) (same as ap_prefixes.ini)

- If you want to edit how many prefixes can be loaded, open the .sma file and find
PHP Code:
#define MAX_BAD_PREFIXES 100 
and edit 100 to any number you want (It is recommended not to be touched)


This plugin is tested by me, m0skVi4a ;] , on AMX MOD X 1.8.2 and it works properly!!!
Attached Files
File Type: sma Get Plugin or Get Source (AdminPrefixes.sma - 25589 views - 20.7 KB)
File Type: sma Get Plugin or Get Source (AdminPrefixes_WHITE_CHAT.sma - 12434 views - 21.5 KB)
File Type: sma Get Plugin or Get Source (AdminPrefixesMYSQL.sma - 9352 views - 22.1 KB)
File Type: sma Get Plugin or Get Source (AdminPrefixesMYSQL_WHITE_CHAT.sma - 8381 views - 22.9 KB)
File Type: txt admin_prefixes.txt (1.9 KB, 11985 views)
File Type: ini ap_bad_prefixes.ini (43 Bytes, 10067 views)
File Type: ini ap_prefixes.ini (176 Bytes, 12911 views)
File Type: zip AdminPrefixes_4.0.zip (23.5 KB, 23599 views)

Last edited by m0skVi4a; 08-18-2013 at 14:48. Reason: Update
m0skVi4a is offline
Send a message via Skype™ to m0skVi4a
spike1554746
Junior Member
Join Date: Mar 2012
Old 04-22-2012 , 11:51   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #2

nice plugin i well try it
spike1554746 is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 04-22-2012 , 12:12   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #3

Isn't this already made?
__________________
Ex1ne is offline
pacheco
Senior Member
Join Date: Jul 2011
Old 04-22-2012 , 12:36   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #4

gj
__________________



pacheco is offline
m0skVi4a
Senior Member
Join Date: May 2011
Location: Rousse, Bulgaria
Old 04-22-2012 , 12:36   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #5

Quote:
Originally Posted by Ex1ne View Post
Isn't this already made?
If you mean this http://forums.alliedmods.net/showthread.php?t=156578 it is not the same at all.
m0skVi4a is offline
Send a message via Skype™ to m0skVi4a
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 04-22-2012 , 17:25   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #6

I installed but, it gave bad_load error ? Help pls
akcaliberg is offline
m0skVi4a
Senior Member
Join Date: May 2011
Location: Rousse, Bulgaria
Old 04-23-2012 , 11:12   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #7

Quote:
Originally Posted by akcaliberg View Post
I installed but, it gave bad_load error ? Help pls
Please give more information or picture
m0skVi4a is offline
Send a message via Skype™ to m0skVi4a
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 04-23-2012 , 16:58   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #8

Thanks, I solved the problem. cstrike module was missing. I installed the module and it worked.

Last edited by akcaliberg; 04-23-2012 at 16:59.
akcaliberg is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-24-2012 , 03:07   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #9

#if defined USE_SQL
#include <sqlx>
#endif

Would be better!
bazhenov93 is offline
shadybg
Member
Join Date: Jun 2011
Old 04-24-2012 , 08:08   Re: Admin Prefixes V1.0 by m0skVi4a ;]
Reply With Quote #10

How about ML support?
shadybg is offline
Reply


Thread Tools
Display Modes

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 10:15.


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