Fixed ZMarket error.

This commit is contained in:
Greyscale 2009-06-21 13:56:48 -07:00
parent a0d2f58c35
commit 38b256419d

View File

@ -740,9 +740,6 @@ stock bool:ZMarketEquip(client, const String:weapon[], bool:rebuy = false)
// Get weapon index.
new weaponindex = WeaponsNameToIndex(weapon);
// Get slot index of the weapon being purchased.
new WeaponsSlot:slot = WeaponsGetSlot(weaponindex);
// If weapon index is -1, then something went very wrong.
if (weaponindex == -1)
{
@ -750,6 +747,9 @@ stock bool:ZMarketEquip(client, const String:weapon[], bool:rebuy = false)
return false;
}
// Get slot index of the weapon being purchased.
new WeaponsSlot:slot = WeaponsGetSlot(weaponindex);
// If client is a zombie, then update weapon loadout and stop.
if (InfectIsClientInfected(client))
{
@ -1029,6 +1029,12 @@ ZMarketRebuy(client, bool:autorebuy = false)
// x = Weapon slot.
for (new x = 0; x < WEAPONS_SLOTS_MAX; x++)
{
// If slot is empty, then stop.
if (!rebuyweapons[x][0])
{
continue;
}
ZMarketEquip(client, rebuyweapons[x], true);
}