This is a mod inspecific Clan Management System for Admins who are busy, and dont need the hastle of managing their clan flags for amxmodx. It will handle any number of Clans / Ranks / Members. In brief its easy, once its setup. It takes a bit to setup and I am working on a Web Interface for it but at the moment do NOT have the time to complete it. Help in this area would be appreciated. Ok to details:
1) You MUST have a DBI.
2) You MUST enable the dbi in you modules.ini
3) You MUST put in the proper information in your sql.cfg
1) Once you have created your DB in lets say MySQL you must install the clanmanager.sql (For further info ask somewhere else plz)
2) Next you must edit the clanmanager_inputs.sql to suit your clan (I have provided a demo version to go with this plugin)
2a) If your editing it you will notice that there are alot of '(s)' these denote spaces within the clan tag. So lets say your a General, and your clan tag is |BW| and your name is Zor, the plugin will autorename you when you join the server, if enabled, to the following: |BW| Gen Zor, what its actually seeing is the following: |BW|(s)Gen(s)Zor, and will repace the (s) with white space. so you must take care in your setup before installing it to your DB. Ok so lets get into the examples.
First the Clan Definition:
INSERT INTO clan_manager_clans VALUES (1, 'The Generic Clan', 'Generic Clan', '[GC](s)', '(s)|UC|', 1);
Lets break it down:
// This is the Reference for this clan, first one
// This is the Full Clan Name
'The Generic Clan',
// This is the Clan Tag
// What goes in front of the player name
// What goes in after the player name
// Position of the rank in the group, it starts at 0
So for this generic clan the result would look like this:
[GC] (Rank) PlayerName |UC|
Next lets go over the Clan Ranks:
INSERT INTO clan_manager_levels VALUES (1, 24, 'General', '(s)(Gen)', 'abcdefghijkmnopqrsltu');
Lets break it down:
// This is the clan this Rank is associated with
// This is the index of this Rank
// This is the full name of the Rank
// This is the short name of the Rank
// These are the Amxmodx Flags this Rank is Granted
Now you HAVE to ensure to edit these appropriately.
Lastly we will go over the Clan Members:
INSERT INTO clan_manager_members VALUES ('STEAM_0:0:000000', 'John(s)Doe', 1, 24, NOW(), NOW(), '0', '0', '', '1');
Lets break it down:
// Duh! Hehehe
// This is the members name WITHOUT clan stuff
// This is the clan he belongs too
// This is his Rank Reference, in this case General
// When did he join the clan
// When was the last time he was on a clan server
// Is he a webadmin (Stub for Now)
// Level of webadmin (Stub for Now)
// His Webadmin Password (Stub for Now)
// Is he an active member
Remember...you DO NOT NEED TO SETUP MEMBERS THIS WAY! You can wait untill they are on the server and use the clan_menu Menu to add ppl and assign them a Rank.
So putting it all for our demo. John Doe joins the server, it looks at his Steam ID and then determines what clan he is in, what rank he is, and then assigns the Amxmodx Flags respective of his rank to him. And then if enabled it will then rename him, great for those automatic promotions, or sill pricks that like to play on the server with a pseudo name, ick...so in this regard the Player will get named the following:
So, all in all thats about sums it up. Once point you can leave ppl in the users.ini if you wish...just make sure that this plugin is placed IMEDIATELY after the admins.amxx in your plugins.ini.
Question let me know in this thread!
- Added change info and moved the actuall check of user into a function of its own
- Changed all the LIKE to RLIKE for regular expresions, added server_print so that if called from console the caller gets some info on whats up
- Fixed the sql setup to eliminate all the redundant connections to the sql server
- Fixed it so that on the demote and promote it will tell the rank name not the number
- Added the NOW() for last time they connected
- Added setting a clan member to a certian level
- Fixed up the sql result calls
- Added first join in the member add
- Fixed error with the names with spaces in them not renaming correct
- Added menus, at this moment they are looping, not sure why. Will continue testing
v0.3a - Menus are working
v0.4 - Worked on the sql connection area and now only have one connect instead of a bunch.
v0.5 - Fixed errors with dbi_num_rows
v0.5a - Added clan_listmembers, and clan_active as well as menus for the clan_active
- Get a working web interface for this
clan_replace_with " "