From 13fff1f8bc7f37a07820c6816d89ec60f2086444 Mon Sep 17 00:00:00 2001 From: zaCade Date: Mon, 7 Aug 2017 23:50:39 +0200 Subject: [PATCH] CSGO fixes & no longer spawn with restricted stuff --- src/zr/weapons/restrict.inc | 10 ++++++++-- src/zr/weapons/weapons.inc | 8 +++++--- src/zr/weapons/zmarket.inc | 13 ++++++++++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/zr/weapons/restrict.inc b/src/zr/weapons/restrict.inc index 19c523e..414847a 100644 --- a/src/zr/weapons/restrict.inc +++ b/src/zr/weapons/restrict.inc @@ -170,11 +170,17 @@ RestrictOnClientSpawn(client) if (ZRIsClientOnTeam(client, CS_TEAM_T)) { - GivePlayerItem(client, WEAPONS_SPAWN_T_WEAPON); + if (g_Game == Game_CSGO) + GivePlayerItem(client, WEAPONS_SPAWN_CSGO_T_WEAPON); + else + GivePlayerItem(client, WEAPONS_SPAWN_CSS_T_WEAPON); } else if (ZRIsClientOnTeam(client, CS_TEAM_CT)) { - GivePlayerItem(client, WEAPONS_SPAWN_CT_WEAPON); + if (g_Game == Game_CSGO) + GivePlayerItem(client, WEAPONS_SPAWN_CSGO_CT_WEAPON); + else + GivePlayerItem(client, WEAPONS_SPAWN_CSS_CT_WEAPON); } } } diff --git a/src/zr/weapons/weapons.inc b/src/zr/weapons/weapons.inc index fef0e1b..b2e91fa 100644 --- a/src/zr/weapons/weapons.inc +++ b/src/zr/weapons/weapons.inc @@ -36,10 +36,12 @@ #define WEAPONS_SLOTS_MAX 5 /** - * @section CS:S start weapons. + * @section start weapons. */ -#define WEAPONS_SPAWN_T_WEAPON "weapon_glock" -#define WEAPONS_SPAWN_CT_WEAPON "weapon_usp" +#define WEAPONS_SPAWN_CSS_T_WEAPON "weapon_glock" +#define WEAPONS_SPAWN_CSS_CT_WEAPON "weapon_usp" +#define WEAPONS_SPAWN_CSGO_T_WEAPON "weapon_glock" +#define WEAPONS_SPAWN_CSGO_CT_WEAPON "weapon_usp_silencer" /** * @endsection */ diff --git a/src/zr/weapons/zmarket.inc b/src/zr/weapons/zmarket.inc index bad9b01..10ee973 100644 --- a/src/zr/weapons/zmarket.inc +++ b/src/zr/weapons/zmarket.inc @@ -1298,14 +1298,21 @@ ZMarketRebuy(client, bool:autorebuy = false) } } - ZMarketEquip(client, rebuyweapons[x], autorebuy); + if (!RestrictIsWeaponRestricted(WeaponsNameToIndex(rebuyweapons[x]))) + ZMarketEquip(client, rebuyweapons[x], autorebuy); } if(autorebuy) { // Always equip kevlar and hegrenade - ZMarketEquip(client, "Kevlar Vest", autorebuy); - ZMarketEquip(client, "HEGrenade", autorebuy); + if (!RestrictIsWeaponRestricted(WeaponsNameToIndex("Kevlar Vest"))) + ZMarketEquip(client, "Kevlar Vest", autorebuy); + + if (!RestrictIsWeaponRestricted(WeaponsNameToIndex("HEGrenade"))) + ZMarketEquip(client, "HEGrenade", autorebuy); + + if (!RestrictIsWeaponRestricted(WeaponsNameToIndex("Smokegrenade"))) + ZMarketEquip(client, "Smokegrenade", autorebuy); } }