-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUpgrade_GangSlots.sp
55 lines (47 loc) · 1.12 KB
/
Upgrade_GangSlots.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <JailBreak>
#include <JB_GangsSystem>
#include <JB_GangsUpgrades>
#define PLUGIN_AUTHOR "KoNLiG"
enum
{
Item_Price = 0,
Item_Slots
}
int g_iUpgradeId = -1;
int g_iLevels[][] =
{
{ 100000, 6 },
{ 200000, 8 },
{ 300000, 10 },
{ 400000, 12 }
};
public Plugin myinfo =
{
name = "[CS:GO] Gangs Upgrades - Slots",
author = PLUGIN_AUTHOR,
description = "",
version = JAILBREAK_VERSION,
url = "https://steamcommunity.com/id/KoNLiG/ || KoNLiG#6417"
};
public void OnLibraryAdded(const char[] name)
{
if (StrEqual(name, "JB_GangsUpgrades"))
{
g_iUpgradeId = JB_CreateGangUpgrade("gangslots", "More Slots", "Grants more available player slots to the gang.");
for (int iCurrentLevel = 0; iCurrentLevel < sizeof(g_iLevels); iCurrentLevel++)
{
JB_CreateGangUpgradeLevel(g_iUpgradeId, g_iLevels[iCurrentLevel][Item_Price]);
}
}
}
public void JB_OnUpgradeUpgraded(int client, int upgradeIndex, int level)
{
if (g_iUpgradeId == upgradeIndex)
{
Gangs_SetGangSlots(Gangs_GetPlayerGang(client), g_iLevels[level - 1][Item_Slots]);
}
}
/* */