From 65083757b21fe36e5f00c4e8cc411fdf92e72884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Lo=20Giudice?= Date: Fri, 6 Jan 2017 01:13:34 -0300 Subject: [PATCH] Allow get knife info with rg_get_weapon_info (#38) Issue: https://github.com/s1lentq/reapi/issues/29 --- reapi/src/natives/natives_misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index 44db141..3649ac7 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -661,7 +661,7 @@ cell AMX_NATIVE_CALL rg_get_weapon_info(AMX *amx, cell *params) WeaponIdType weaponID = static_cast(*getAmxAddr(amx, params[arg_weapon_id])); WpnInfo info_type = static_cast(*getAmxAddr(amx, params[arg_type])); - if (!GetWeaponInfoRange(weaponID) && info_type != WI_ID) + if (!GetWeaponInfoRange(weaponID) && info_type != WI_ID && weaponID != WEAPON_KNIFE) { MF_LogError(amx, AMX_ERR_NATIVE, "%s: invalid weapon id %i", __FUNCTION__, weaponID); return 0;