From 5c8a76577669d6d98909e7d45ed227b47d953ffd Mon Sep 17 00:00:00 2001 From: zaCade Date: Thu, 12 Oct 2017 21:52:59 +0200 Subject: [PATCH] Eh, dunno. --- FixPlayerEquip/scripting/FixPlayerEquip.sp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/FixPlayerEquip/scripting/FixPlayerEquip.sp b/FixPlayerEquip/scripting/FixPlayerEquip.sp index 23a99a0..d4cdeb7 100644 --- a/FixPlayerEquip/scripting/FixPlayerEquip.sp +++ b/FixPlayerEquip/scripting/FixPlayerEquip.sp @@ -78,12 +78,11 @@ public Action OnUse(int entity, int client) { if(!bGaveAmmo) { - int iWeapon = GetPlayerWeaponSlot(client, CS_SLOT_PRIMARY); - if(iWeapon != -1) + int iWeapon = INVALID_ENT_REFERENCE; + if((iWeapon = GetPlayerWeaponSlot(client, CS_SLOT_PRIMARY)) != INVALID_ENT_REFERENCE) StockPlayerAmmo(client, iWeapon); - iWeapon = GetPlayerWeaponSlot(client, CS_SLOT_SECONDARY); - if(iWeapon != -1) + if((iWeapon = GetPlayerWeaponSlot(client, CS_SLOT_SECONDARY)) != INVALID_ENT_REFERENCE) StockPlayerAmmo(client, iWeapon); bGaveAmmo = true;