Jailbreak Gangs
About:
This is a gangs plugin that allows people to create gangs and invite their friends! Once members of the gangs gather enough credits/points, they're able to unlock gang powerups! This allows people to get together and have some fun. Perks that gangs can work towards include extra health, damage, lower gravity, higher speed, and finally gang size increase! The powerups given are very slight, and do not impede gameplay in any way. Powerups are also disabled when there's only one terrorist left (last request). Give it a try!
Installation:
If you're running a supported store, go ahead and throw away hl_gangs_credits.smx since you don't need a store system. Due to the fact that gang's skill levels depend on credits,
I included a default credit system that is very simple. This is just so the gangs plugin will work even if you don't have a supported store system.
hl_gangs_credits.smx doesn't require a database entry (it uses hl_gang's database)
- Install plugin into sourcemod/plugins directory
- Add database.cfg entry under hl_gangs (default cvar value)
- Load plugins in game
- Have fun
Commands:
Cvar File:
Bugs:
If you have any issues or bugs then you should create an issue on GitHub!
Download: Here
Gangs Include
Spoiler
PHP Code:
#if defined hl_gangs_include
#endinput
#endif
#define hl_gangs_include
/* Gang Ranks */
enum GangRank
{
Rank_Invalid = -1,
Rank_Normal,
Rank_Admin,
Rank_Owner
}
/**
* Outputs a formatted message to the client
*
* @param client client index
* @return int gang size
*/
native void Gangs_Message(int client, const char[] format, any ...);
/**
* Outputs a formatted message to all clients
*
* @param client client index
* @return int gang size
*/
native void Gangs_MessageToAll(int client, const char[] format, any ...);
/**
* Returns the size of a client's gang
*
* @param client client index
* @return int gang size
*/
native int Gangs_GetGangSize(int client)
/**
* Returns if a client is a member of a gang
*
* @param client client index
* @return bool gang status
*/
native bool Gangs_HasGang(int client);
/**
* Get a client's gang rank
*
* @param client client index
* @return GangRank gang rank
*/
native GangRank Gangs_GetGangRank(int client);
/**
* Get a client's gang name
*
* @param client client index
* @return no return
*/
native void Gangs_GetGangName(int client, char[] buffer, int maxlength);
/**
* Returns a client's damage modifier
*
* @param client client index
* @return float damage modifier
*/
native float Gangs_GetDamageModifier(client);
/**
* Called after the main menu is built, but before it's displayed.
* @param client Player's index.
* @param menu Menu being displayed to the client.
* @noreturn
*/
forward void Gangs_OnMenuCreated(int client, Menu menu);
/**
* Called once a main menu item has been selected
* @param menu Menu displayed
* @param action Menu Action
* @param param1 client index
* @param param2
* @noreturn
*/
forward void Gangs_OnMenuCallback(Menu menu, MenuAction action, int param1, int param2);
/**
* Called after the perk menu is built, but before it's displayed.
* This is where you can add custom perks. See Gangs_OnPerkMenuCallback
*
* @param client Player's index.
* @param menu Menu being displayed to the client.
* @noreturn
*/
forward void Gangs_OnPerkMenuCreated(int client, Menu menu);
/**
* Called once a perk menu item has been selected
* @param menu Menu displayed
* @param action Menu Action
* @param param1 client index
* @param param2
* @noreturn
*/
forward void Gangs_OnPerkMenuCallback(Menu menu, MenuAction action, int param1, int param2);
public SharedPlugin __pl_hl_gangs =
{
name = "hl_gangs",
file = "hl_gangs.smx",
#if defined REQUIRE_PLUGIN
required = 1
#else
required = 0
#endif
};
#if !defined REQUIRE_PLUGIN
public __pl_hl_gangs_SetNTVOptional()
{
MarkNativeAsOptional("Gangs_GetDamageModifier");
MarkNativeAsOptional("Gangs_GetGangName");
MarkNativeAsOptional("Gangs_GetGangRank");
MarkNativeAsOptional("Gangs_HasGang");
MarkNativeAsOptional("Gangs_GetGangSize");
MarkNativeAsOptional("Gangs_Message");
MarkNativeAsOptional("Gangs_MessageToAll");
}
#endif
HOW TO ASK A QUESTION:
If you're having a problem, post containing information about what you have tried, exactly what is wrong, error logs, or other useful information. If you chose to not provide this information, no one's going to help you.