AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Gangs Mod - Jailbreak (https://forums.alliedmods.net/showthread.php?t=219638)

Eden.Campo 07-01-2013 05:36

[CS:S] Gangs Mod - Jailbreak
 
1 Attachment(s)

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

Gecko 07-01-2013 19:18

Re: Gangs Mod - Jailbreak
 
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 07-01-2013 20:13

Re: Gangs Mod - Jailbreak
 
Also this plugin lags my server quite a bit..

necavi 07-01-2013 20:18

Re: Gangs Mod - Jailbreak
 
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.

Eden.Campo 07-02-2013 00:40

Re: Gangs Mod - Jailbreak
 
Quote:

Originally Posted by Gecko (Post 1981540)
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.

nomy 07-02-2013 02:10

Re: Gangs Mod - Jailbreak
 
This is great, will give it a try!

Aim4Fame 07-02-2013 04:23

Re: Gangs Mod - Jailbreak
 
Make thisone with multilanguage pls!
Nice Plugin, thanks for public..

Eden.Campo 07-02-2013 14:00

Re: Gangs Mod - Jailbreak
 
Quote:

Originally Posted by Aim4Fame (Post 1981685)
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.

Annihilator 07-02-2013 18:55

Re: [CS:S] Gangs Mod - Jailbreak
 
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 :D )

All in all, after TQueries, I will put this one to field testing :3

Eden.Campo 07-03-2013 01:54

Re: [CS:S] Gangs Mod - Jailbreak
 
Quote:

Originally Posted by Annihilator (Post 1982219)
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 :D )

All in all, after TQueries, I will put this one to field testing :3

@Annihilator
Thank you for the feedback.

I will release the new version today with your suggestions (:

Eden.Campo 07-03-2013 03:36

Re: [CS:S] Gangs Mod - Jailbreak
 
@Aim4Fame

Version 1.0.1 Released!

* Added Translations
* Cleaned up the code a bit.

Upcoming at the next version:
Threaded Querys!

Gecko 07-03-2013 16:33

Re: [CS:S] Gangs Mod - Jailbreak
 
I noticed a major bug that players can deposit negative values into gang banks which overflows the data type and allows for obscene amounts of credits to be in the gang bank. All you have to do is deposit -1 credit and you get a huge number of credits in your bank.

There are also some spelling errors:
"premote" should be "promote"
"precent" should be "percent"

Those are the only 2 I can remember at the moment.

Lastly, some of the ConVARs don't always get used. For example, when buying upgrades, the code does not use the ConVAR for the upgrade price, but instead uses a static value of 1500 or something (example).


I think this plugin has good potential though and I really hope you continue to develop it.

Eden.Campo 07-05-2013 05:40

Re: [CS:S] Gangs Mod - Jailbreak
 
Quote:

Originally Posted by Gecko (Post 1982789)
I noticed a major bug that players can deposit negative values into gang banks which overflows the data type and allows for obscene amounts of credits to be in the gang bank. All you have to do is deposit -1 credit and you get a huge number of credits in your bank.

There are also some spelling errors:
"premote" should be "promote"
"precent" should be "percent"

Those are the only 2 I can remember at the moment.

Lastly, some of the ConVARs don't always get used. For example, when buying upgrades, the code does not use the ConVAR for the upgrade price, but instead uses a static value of 1500 or something (example).


I think this plugin has good potential though and I really hope you continue to develop it.

Thanks again. I'm working on fixes, though I need some help with translations, VFormat errors.
If you can, please add me on steam: Eden.Campo/edencampo.

Aim4Fame 07-05-2013 17:37

Re: [CS:S] Gangs Mod - Jailbreak
 
@Eden.Campo
Thanks and i wait for the new one..
Please add more features to buy for the gang, like gang colors or something or gang skins!
And add the models and materials pls for all..

Nice Plugin boy <3

Eden.Campo 07-07-2013 11:43

Re: [CS:S] Gangs Mod - Jailbreak
 
1 Attachment(s)
Well thanks to @Gecko I'm done with translations for now. Still working on Threaded Querys though.
If someone wants to start translating, here are the phrases.

Gecko 07-07-2013 14:39

Re: [CS:S] Gangs Mod - Jailbreak
 
1 Attachment(s)
I fixed up the english translations for you, there were a few mistakes. None of the phrase keys were changed though.

Darksilvers 07-26-2013 05:57

Re: [CS:S] Gangs Mod - Jailbreak
 
Where is the reference to the download?

Eden.Campo 07-31-2013 02:40

Re: [CS:S] Gangs Mod - Jailbreak
 
I've uploaded a download, sorry for all the time it took, was kinda busy.. Though the Gangs are non-threaded yet, it's not bugged and can be used freely.

HvG Community 12-30-2013 19:24

Re: [CS:S] Gangs Mod - Jailbreak
 
why is requirment shitty public store?
can i edit .sp file so it works without store.

HvG Community 12-30-2013 21:14

Re: [CS:S] Gangs Mod - Jailbreak
 
wrong topic

SlayeRbe 02-11-2014 13:09

Re: [CS:S] Gangs Mod - Jailbreak
 
Where are the guns?

ViralExile 12-13-2014 12:13

Re: [CS:S] Gangs Mod - Jailbreak
 
Sorry to bother can you try to make this work with cs:go?


All times are GMT -4. The time now is 07:23.

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