cs_is_valid_itemid
- Синтаксис
-
stock bool:cs_is_valid_itemid(id, bool:weapon_only = false) { if (id <= CSI_NONE) { return false; } if (id > CSI_LAST_WEAPON && id != CSI_SHIELDGUN && weapon_only) { return false; } if (id >= CSI_MAX_COUNT) { return false; } return true; }
Переменная | Описание |
---|---|
id |
Item id (CSI_* constants) |
weapon_only |
If true, only the real weapon ids will be checked, including shield as well |
- Описание
- Checks whether an item id is not out of bounds.
- Возвращает
- True if item id is valid, false otherwise