So use it like this in your code:
PHP Code:
new const m_pActiveItem = 373
if (cs_get_weapon_ammo(get_pdata_cbase(id, m_pActiveItem )) >= 1)
This should work if players have only ups(no other items, not even knife).
PHP Code:
new activeItem = get_pdata_cbase(id, m_pActiveItem)
//check to see if activeItem entity is valid
if (cs_get_weapon_ammo(activeItem) >= 1)
return
cs_set_weapon_ammo(activeItem, 1)
If they can have more items, you need to check m_rgpPlayerItems[1](1 = pistol slot) offset(either directly, if they can have only USP or loop thru it using m_pNext if they can have 2 or more pistols).
__________________