Optimized:
Code:
stock cs_get_user_hassecond(id)
{
new weapons[32], num = 0, weapon
return get_user_weapons(id, weapons, num) & (1<<CSW_GLOCK18 | 1<<CSW_USP | 1<<CSW_P228 | 1<<CSW_DEAGLE | 1<<CSW_FIVESEVEN | 1<<CSW_ELITE)
}
For get_ammotype you don't really need to perform a copy every time, it's inefficient.