Plugin Header
Code:
#define GUN_BITS (1<<CSW_P228|1<<CSW_GLOCK18|1<<CSW_USP|1<<CSW_DEAGLE|1<<CSW_FIVESEVEN|1<<CSW_ELITE|1<<CSW_M3|1<<CSW_XM1014|1<<CSW_TMP|1<<CSW_MP5NAVY|1<<CSW_MAC10|1<<CSW_UMP45|1<<CSW_P90|1<<CSW_AK47|1<<CSW_M4A1|1<<CSW_SCOUT|1<<CSW_SG552|1<<CSW_SG550|1<<CSW_GALIL|1<<CSW_FAMAS|1<<CSW_AWP|1<<CSW_G3SG1|1<<CSW_M249)
new const g_cPrimaryWeaponsName [ ] [ ] =
{
"M4A1 Automatic",
"AK47 Kalashnikov",
"Famas",
"Galil",
"M249 Machine Gun"
};
new const g_cPrimaryWeaponsEntity [ ] [ ] =
{
"weapon_m4a1",
"weapon_ak47",
"weapon_famas",
"weapon_galil",
"weapon_m249"
};
where don't work:
Code:
public PRIMARY_WEAPONS_HANDLER ( iEntity, iMenu, iKey )
{
if ( iKey == MENU_EXIT )
{
menu_destroy ( iMenu );
return;
}
give_item ( iEntity, g_cPrimaryWeaponsEntity [ iKey ] );
new iWeaponID = get_user_weapon ( iEntity );
if ( GUN_BITS & (1<<iWeaponID) )
cs_set_user_bpammo ( iEntity, iWeaponID, 90 );
}
it give's me the right weapon but don't give 90 bpammo for that weapon
__________________