mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-28 15:45:31 +03:00
Allow get knife info with rg_get_weapon_info (#38)
Issue: https://github.com/s1lentq/reapi/issues/29
This commit is contained in:
parent
05a5f1686e
commit
65083757b2
@ -661,7 +661,7 @@ cell AMX_NATIVE_CALL rg_get_weapon_info(AMX *amx, cell *params)
|
||||
WeaponIdType weaponID = static_cast<WeaponIdType>(*getAmxAddr(amx, params[arg_weapon_id]));
|
||||
WpnInfo info_type = static_cast<WpnInfo>(*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;
|
||||
|
Loading…
Reference in New Issue
Block a user