Something you can do, is:
Create or find a variable which stores the selected weapon slot;
Hook the moment the slot is select (user clicks), which is before Ham_Item_Deploy;
In Ham_Item_Deploy, check that variable:
PHP Code:
public Item_Deploy_Post(const ent) {
new id = get_pdata_cbase(ent,41)
new wpn = get_pdata_int(ent,43)
if(wpn == certain_weapon) {
switch(weapon_slot) {
case 1: set_pev(id,pev_viewmodel2,mdl_a)
case 2: set_pev(id,pev_viewmodel2,mdl_b)
default: return HAM_IGNORED
}
return HAM_IGNORED
}
return HAM_IGNORED
}
__________________