CSGO fixes & no longer spawn with restricted stuff

This commit is contained in:
zaCade 2017-08-07 23:50:39 +02:00
parent 0f6b46a962
commit 13fff1f8bc
3 changed files with 23 additions and 8 deletions

View File

@ -170,11 +170,17 @@ RestrictOnClientSpawn(client)
if (ZRIsClientOnTeam(client, CS_TEAM_T)) 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)) 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);
} }
} }
} }

View File

@ -36,10 +36,12 @@
#define WEAPONS_SLOTS_MAX 5 #define WEAPONS_SLOTS_MAX 5
/** /**
* @section CS:S start weapons. * @section start weapons.
*/ */
#define WEAPONS_SPAWN_T_WEAPON "weapon_glock" #define WEAPONS_SPAWN_CSS_T_WEAPON "weapon_glock"
#define WEAPONS_SPAWN_CT_WEAPON "weapon_usp" #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 * @endsection
*/ */

View File

@ -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) if(autorebuy)
{ {
// Always equip kevlar and hegrenade // Always equip kevlar and hegrenade
ZMarketEquip(client, "Kevlar Vest", autorebuy); if (!RestrictIsWeaponRestricted(WeaponsNameToIndex("Kevlar Vest")))
ZMarketEquip(client, "HEGrenade", autorebuy); ZMarketEquip(client, "Kevlar Vest", autorebuy);
if (!RestrictIsWeaponRestricted(WeaponsNameToIndex("HEGrenade")))
ZMarketEquip(client, "HEGrenade", autorebuy);
if (!RestrictIsWeaponRestricted(WeaponsNameToIndex("Smokegrenade")))
ZMarketEquip(client, "Smokegrenade", autorebuy);
} }
} }