AMX Mod X API Documentation

Signature
native rg_switch_best_weapon(const player, const currentWeapon = 0);
Description

Switches player current weapon into the best one on its inventory using the CHalfLifeMultiplay::GetNextBestWeapon function.

Notes
  • Weapon selection is based on weapon's Weight attribute from ItemInfo structure.
Parameters
  • player Player index.
  • currentWeapon Current player active weapon. 0 = retrieve from m_pActiveItem member
Returns

1 if weapon was found and switched to, 0 otherwise

Назад
Верх