Raised This Month: $119 Target: $400
 29% 

[CS:S] Gangs Mod - Jailbreak


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Eden.Campo
Member
Join Date: Mar 2013
Plugin ID:
3718
Plugin Version:
1.0.1
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Create and Lead the best Gangs on the server!
    Old 07-01-2013 , 05:36   [CS:S] Gangs Mod - Jailbreak
    Reply With Quote #1


    Gangs Mod - Jailbreak


    Description:
    Use this mod to create and rule Gangs in your servers. I've created this mod because I saw that only one mod like this exists, and it's abandoned by the author.


    Requirements:
    MySQL System
    Store

    Features:
    * Create and Disband Gangs
    * Invite or Expel Gang Members
    * Unlimited Slot expension(controlable by CVar)
    * Gang Banks
    * Gang Ranks(supports Custom Ranks)
    * Gang Bonuses(Guns, Armor, Health, Grenades etc.)
    * Gang Privacy(Public or Private Gangs)
    * Gang Admin Menu
    * Gang Disband Passwords


    Installation::

    Download the attached zip archive and extract to your sourcemod folder. Then navigate to your configs/ directory and add the following entry in databases.cfg:

    Code:
    "gangs"
    {
        "driver"        "mysql"
        "host"          "<your-database-host>"
        "database"      "<your-database-name>"
        "user"          "<username>"
        "pass"          "<password>"
    }
    Next, navigate to configs/gangs/sql-init-scripts and execute gangs.sql in your database

    ConVars:

    Code:
    // Use Gang Banks? 1 = Yes, 0 = No
    // -
    // Default: "1"
    gangs_bank "1"
    
    // Decides how much credits will it cost to upgrade a bonus
    // -
    // Default: "1500"
    gangs_bonus_upgrade_credits "1500"
    
    // Decides how much credits will it cost to change a gang name
    // -
    // Default: "1000"
    gangs_changename_credits "1000"
    
    // Decides how many credits you need to create a new Gang
    // -
    // Default: "1500"
    gangs_create_credits "1500"
    
    // Decides how much credits will it cost to expend a gang
    // -
    // Default: "750"
    gangs_expend_credits_per_slot "750"
    
    // Define your Master Key here
    // -
    // Default: ""
    gangs_masterkey ""
    
    // If enabled everyone with Master Key will be able to control every Gang!
    // -
    // Default: "1"
    gangs_masterkey_use "1"
    
    // Maximum members that can be at a Gang (AFTER EXPENTION)
    // -
    // Default: "10"
    gangs_max_members "10"
    
    // Decides if anyone can disband a Gang with a password, or just the Leader
    // -
    // Default: "1"
    gangs_use_disband_pass "1"
    
    // Decides if Gangs will be using Ranks for permissions or everyone can do anything
    // -
    // Default: "1"
    gangs_use_ranks "1"
    Commands:
    !creategang - Creates a new Gang for 1500 credits(by default, editable). After typing creategang you should type your disband password in chat.

    !disbandgang - Used only when gangs_use_disband_pass is set to 0. Gives you the ability to disband a Gang as a Leader.

    !gang - Opens your Gang Main Menu, with info about your gang and features.

    !gangs - Opens a menu that shows all the Gangs on the server, if public, you can join a Gang from that menu.

    !gangmaster - Access the Gang Admin Menu with the Master Key you defined in the cfg.

    Known Bugs:
    None.

    Changelog:
    Code:
    1.0.0 - Initial Release
    1.0.1 - Added Translations, cleaned up code and make it a bit easier to read. TQuerys will come at the next version.

    Feel free to post suggestions and requests of new features.

    If you appreciate my work, feel free to Donate
    Attached Files
    File Type: zip Gangs Mod - Jailbreak.zip (52.0 KB, 701 views)

    Last edited by Eden.Campo; 07-31-2013 at 02:39.
    Eden.Campo is offline
    Gecko
    SourceMod Donor
    Join Date: Nov 2010
    Location: Vancouver, Canada
    Old 07-01-2013 , 19:18   Re: Gangs Mod - Jailbreak
    Reply With Quote #2

    You messed up your SQL syntax,
    Code:
    CREATE TABLE IF NOT EXISTS Gang.Gangs_Users
    (
    	SteamID varchar(255) NOT NULL,
    	Name varchar(255) NOT NULL,
    	Gang varchar(255) NOT NULL DEFAULT 'none',
    	Rank varchar(255) NOT NULL DEFAULT 'none'
    );
    Should be

    Code:
    CREATE TABLE IF NOT EXISTS Gangs_Users
    (
    	SteamID varchar(255) NOT NULL,
    	Name varchar(255) NOT NULL,
    	Gang varchar(255) NOT NULL DEFAULT 'none',
    	Rank varchar(255) NOT NULL DEFAULT 'none'
    );
    Without the "Gang.", otherwise it returns with denied permission.

    As with the other CREATE statements.
    __________________
    "My brain is so left-sided, it isn't even funny... at all."
    Gecko is offline
    Gecko
    SourceMod Donor
    Join Date: Nov 2010
    Location: Vancouver, Canada
    Old 07-01-2013 , 20:13   Re: Gangs Mod - Jailbreak
    Reply With Quote #3

    Also this plugin lags my server quite a bit..
    __________________
    "My brain is so left-sided, it isn't even funny... at all."
    Gecko is offline
    necavi
    Veteran Member
    Join Date: Sep 2010
    Old 07-01-2013 , 20:18   Re: Gangs Mod - Jailbreak
    Reply With Quote #4

    Most of the lag could likely be attributed to the fact that this plugin seems to use non-threaded queries (a big no-no for what it is trying to do). Not to mention some very...poor coding overall.
    necavi is offline
    Eden.Campo
    Member
    Join Date: Mar 2013
    Old 07-02-2013 , 00:40   Re: Gangs Mod - Jailbreak
    Reply With Quote #5

    Quote:
    Originally Posted by Gecko View Post
    You messed up your SQL syntax,
    Code:
    CREATE TABLE IF NOT EXISTS Gang.Gangs_Users
    (
    	SteamID varchar(255) NOT NULL,
    	Name varchar(255) NOT NULL,
    	Gang varchar(255) NOT NULL DEFAULT 'none',
    	Rank varchar(255) NOT NULL DEFAULT 'none'
    );
    Should be

    Code:
    CREATE TABLE IF NOT EXISTS Gangs_Users
    (
    	SteamID varchar(255) NOT NULL,
    	Name varchar(255) NOT NULL,
    	Gang varchar(255) NOT NULL DEFAULT 'none',
    	Rank varchar(255) NOT NULL DEFAULT 'none'
    );
    Without the "Gang.", otherwise it returns with denied permission.

    As with the other CREATE statements.
    @Gecko
    Thanks, fixed that.

    also, I will try using TQuerys to fix the lag issue, I'll upload a new version when I'm done.

    Last edited by Eden.Campo; 07-02-2013 at 00:46.
    Eden.Campo is offline
    nomy
    Senior Member
    Join Date: Dec 2009
    Location: United Kingdom
    Old 07-02-2013 , 02:10   Re: Gangs Mod - Jailbreak
    Reply With Quote #6

    This is great, will give it a try!
    nomy is offline
    Aim4Fame
    Member
    Join Date: Jan 2013
    Location: Germany
    Old 07-02-2013 , 04:23   Re: Gangs Mod - Jailbreak
    Reply With Quote #7

    Make thisone with multilanguage pls!
    Nice Plugin, thanks for public..
    Aim4Fame is offline
    Send a message via Skype™ to Aim4Fame
    Eden.Campo
    Member
    Join Date: Mar 2013
    Old 07-02-2013 , 14:00   Re: Gangs Mod - Jailbreak
    Reply With Quote #8

    Quote:
    Originally Posted by Aim4Fame View Post
    Make thisone with multilanguage pls!
    Nice Plugin, thanks for public..
    @Aim4Fame
    Thanks, I'm working on translations right now. Expect it ready tommarow+-.

    @nomy
    Thanks!

    Also, working on TQuerys to reduce server lag, should fully be supported this week.

    Thanks for all the comments.

    Last edited by Eden.Campo; 07-02-2013 at 14:00.
    Eden.Campo is offline
    Annihilator
    Senior Member
    Join Date: Nov 2006
    Location: Lithuania
    Old 07-02-2013 , 18:55   Re: [CS:S] Gangs Mod - Jailbreak
    Reply With Quote #9

    Nice plugin, looked though your code and here's a few suggestions:

    When creating GangMainMenu you don't need to put the whole menu in an if statement, only the parts that are different for every rank.

    Most of the huge if-else statements in onPlayerSpawn can be changed to switches.

    Try not to create huge functions, divide them into smaller ones, so that you can reuse some of the smaller ones and the code should become shorter (and easier for others to read )

    All in all, after TQueries, I will put this one to field testing
    __________________
    Private Plugins: Jail Rank | Rebel Zones | Round end Rebels | Freekill Guard

    Last edited by Annihilator; 07-02-2013 at 18:55.
    Annihilator is offline
    Eden.Campo
    Member
    Join Date: Mar 2013
    Old 07-03-2013 , 01:54   Re: [CS:S] Gangs Mod - Jailbreak
    Reply With Quote #10

    Quote:
    Originally Posted by Annihilator View Post
    Nice plugin, looked though your code and here's a few suggestions:

    When creating GangMainMenu you don't need to put the whole menu in an if statement, only the parts that are different for every rank.

    Most of the huge if-else statements in onPlayerSpawn can be changed to switches.

    Try not to create huge functions, divide them into smaller ones, so that you can reuse some of the smaller ones and the code should become shorter (and easier for others to read )

    All in all, after TQueries, I will put this one to field testing
    @Annihilator
    Thank you for the feedback.

    I will release the new version today with your suggestions (:
    Eden.Campo 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 05:39.


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