#include <amxmodx>
#include <fakemeta>
new const g_iWeaponMaxAmmo[33]= {-2, 52, 0, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120, 30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, 0, 100, -1, -1}
new bool:ma_klase[33];
public eventCurWeapon(id)
{
if(!ma_klase[id])
return PLUGIN_CONTINUE
static iWeapon;
iWeapon = get_user_weapon(id)
if(iWeapon == CSW_DEAGLE)
fm_set_user_bpammo(id, iWeapon, g_iWeaponMaxAmmo[iWeapon])
return PLUGIN_CONTINUE
}
stock fm_set_user_bpammo(id, weapon, amount)
{
static offset
switch(weapon)
{
case CSW_AWP: offset = 377;
case CSW_SCOUT, CSW_AK47,CSW_G3SG1: offset = 378;
case CSW_M249: offset = 379;
case CSW_M4A1, CSW_FAMAS,CSW_AUG,CSW_SG550,CSW_GALI ,CSW_SG552: offset = 380;
case CSW_M3, CSW_XM1014: offset = 381;
case CSW_USP, CSW_UMP45,CSW_MAC10: offset = 382;
case CSW_FIVESEVEN, CSW_P90: offset = 383;
case CSW_DEAGLE: offset = 384;
case CSW_P228: offset = 385;
case CSW_GLOCK18,CSW_MP5NAVY,CSW_TMP,CSW_ELITE: offset = 386;
case CSW_FLASHBANG: offset = 387;
case CSW_HEGRENADE: offset = 388;
case CSW_SMOKEGRENADE: offset = 389;
case CSW_C4: offset = 390;
default: return;
}
set_pdata_int(id, offset, amount, 5);
}