1.1 --- a/scripting/dm_equipment.sp Mon Jul 02 22:36:40 2012 -0400
1.2 +++ b/scripting/dm_equipment.sp Wed Jul 18 13:44:57 2012 -0400
1.3 @@ -44,6 +44,7 @@
1.4 new g_SecondaryChoices[MAXPLAYERS+1]; /* Secondary weapon selections */
1.5 new bool:g_GunMenuEnabled[MAXPLAYERS+1]; /* Whether the gun menu is enabled */
1.6 new bool:g_GunMenuAvailable[MAXPLAYERS+1]; /* Whether the gun menu is available */
1.7 +new bool:g_bIsGo = false; /* Are we running on CS:GO? */
1.8
1.9 /** HUMAN CONFIGS */
1.10 new g_PrimaryList[CSSDM_MAX_WEAPONS];
1.11 @@ -62,6 +63,9 @@
1.12 new bool:g_DefuseKits = true;
1.13 new bool:g_AllowGunCommand = true;
1.14 new g_HealthAmount = 100;
1.15 +//CSGO
1.16 +new bool:g_Decoy = false;
1.17 +new bool:g_Taser = true;
1.18
1.19 /** BOT CONFIGS */
1.20 new g_BotPrimaryList[CSSDM_MAX_WEAPONS];
1.21 @@ -75,6 +79,9 @@
1.22 new bool:g_BotHEs = false;
1.23 new bool:g_BotDefuseKits = true;
1.24 new g_BotHealthAmount = 100;
1.25 +//CSGO
1.26 +new bool:g_BotDecoy = false;
1.27 +new bool:g_BotTaser = true;
1.28
1.29 /** PUBLIC INFO */
1.30 public Plugin:myinfo =
1.31 @@ -92,6 +99,13 @@
1.32
1.33 public OnPluginStart()
1.34 {
1.35 + new String:game[64];
1.36 + GetGameFolderName(game, sizeof(game));
1.37 + if (StrEqual(game, "csgo", false))
1.38 + {
1.39 + g_bIsGo = true;
1.40 + }
1.41 +
1.42 LoadTranslations("cssdm.phrases");
1.43
1.44 RegConsoleCmd("say", Command_Say);
1.45 @@ -198,11 +212,15 @@
1.46 GivePlayerItem(client, "item_kevlar");
1.47 GivePlayerItem(client, "item_kevlar");
1.48 }
1.49 - GiveGrenades(client, g_Flashes, g_HEs, g_Smokes);
1.50 + GiveGrenades(client, g_Flashes, g_HEs, g_Smokes, g_Decoy);
1.51 if (g_NightVision)
1.52 {
1.53 GiveNightVision(client);
1.54 }
1.55 + if (g_bIsGo && g_Taser)
1.56 + {
1.57 + GivePlayerItem(client, "weapon_taser");
1.58 + }
1.59 }
1.60 else
1.61 {
1.62 @@ -229,7 +247,11 @@
1.63 GivePlayerItem(client, "item_kevlar");
1.64 GivePlayerItem(client, "item_kevlar");
1.65 }
1.66 - GiveGrenades(client, g_BotFlashes, g_BotHEs, g_BotSmokes);
1.67 + if (g_bIsGo && g_BotTaser)
1.68 + {
1.69 + GivePlayerItem(client, "weapon_taser");
1.70 + }
1.71 + GiveGrenades(client, g_BotFlashes, g_BotHEs, g_BotSmokes, g_BotDecoy);
1.72 }
1.73 if (!g_AllowBuy && g_SpawnTimers[client] == INVALID_HANDLE)
1.74 {
1.75 @@ -727,6 +749,8 @@
1.76 g_NightVision = KvGetYesOrNo(kv, "nightvision", g_NightVision);
1.77 g_DefuseKits = KvGetYesOrNo(kv, "defusekits", g_DefuseKits);
1.78 g_HealthAmount = KvGetNum(kv, "health", g_HealthAmount);
1.79 + g_Decoy = KvGetYesOrNo(kv, "decoy", g_Decoy);
1.80 + g_Taser = KvGetYesOrNo(kv, "taser", g_Taser);
1.81 KvGoBack(kv);
1.82 }
1.83
1.84 @@ -770,6 +794,10 @@
1.85 g_BotDefuseKits = KvGetYesOrNo(kv, NULL_STRING, true);
1.86 } else if (strcmp(value, "health") == 0) {
1.87 g_BotHealthAmount = KvGetNum(kv, NULL_STRING, 100);
1.88 + } else if (strcmp(value, "decoy") == 0) {
1.89 + g_BotDecoy = KvGetYesOrNo(kv, NULL_STRING, false);
1.90 + } else if (strcmp(value, "taser") == 0) {
1.91 + g_BotTaser = KvGetYesOrNo(kv, NULL_STRING, true);
1.92 }
1.93 } while (KvGotoNextKey(kv, false));
1.94 KvGoBack(kv);
1.95 @@ -884,7 +912,7 @@
1.96 SetEntData(client, g_HealthOffset, health, 4, true);
1.97 }
1.98
1.99 -GiveGrenades(client, flashnum, bool:he, bool:smoke)
1.100 +GiveGrenades(client, flashnum, bool:he, bool:smoke, bool:decoy)
1.101 {
1.102 if (!IsPlayerAlive(client))
1.103 {
1.104 @@ -903,6 +931,10 @@
1.105 {
1.106 GivePlayerItem(client, "weapon_smokegrenade");
1.107 }
1.108 + if (g_bIsGo && decoy)
1.109 + {
1.110 + GivePlayerItem(client, "weapon_decoy");
1.111 + }
1.112 }
1.113
1.114 GiveNightVision(client)