I am trying to make Glock's based weapon don't have the same ammo with MP5 Navy.
I used CurWeapon. it work well but I think i bad for server and I want to find another way

Can I anyone help me?
PHP Code:
public plugin_init()
{
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
RegisterHam(Ham_Weapon_Reload, weapon_infinity, "fw_Weapon_Reload_Post", 1)
}
public Event_CurWeapon(id)
{
if(!is_alive(id))
return
static CSW; CSW = read_data(2)
if((CSW == CSW_INFINITY && g_OldWeapon[id] != CSW_INFINITY) && Get_BitVar(g_Had_Infinity, id))
{
g_PreAmmo[id] = cs_get_user_bpammo(id, CSW_INFINITY)
cs_set_user_bpammo(id, CSW_INFINITY, g_InfinityBPAmmo[id])
} else if((CSW == CSW_INFINITY && g_OldWeapon[id] == CSW_INFINITY) && Get_BitVar(g_Had_Infinity, id)) {
cs_set_user_bpammo(id, CSW_INFINITY, g_InfinityBPAmmo[id])
} else if((CSW != CSW_INFINITY && g_OldWeapon[id] == CSW_INFINITY) && Get_BitVar(g_Had_Infinity, id)) {
g_InfinityBPAmmo[id] = cs_get_user_bpammo(id, CSW_INFINITY)
cs_set_user_bpammo(id, CSW_INFINITY, g_PreAmmo[id])
}
g_OldWeapon[id] = CSW
}
public fw_Weapon_Reload_Post(ent)
{
static id; id = pev(ent, pev_owner)
if(!is_user_alive(id))
return HAM_IGNORED
if(!Get_BitVar(g_Had_Infinity, id))
return HAM_IGNORED
if((get_pdata_int(ent, 54, 4) == 1))
{ // Reload
if(g_Clip[id] == -1)
return HAM_IGNORED
set_pdata_int(ent, 51, g_Clip[id], 4)
Set_WeaponAnim(id, ANIME_RELOAD)
Set_PlayerNextAttack(id, TIME_RELOAD)
g_InfinityBPAmmo[id] -= (CLIP - g_Clip[id])
}
return HAM_HANDLED
}