PHP Code:
public WeaponChange(id)
{
new weapon = read_data(2);
if( is_user_alive(id) && (iGuard==id || iPrisoner==id) && weapon ){
new clip = read_data(3);
if( gLRType == LR_PISTOL && weapon == CSW_DEAGLE ){
if( clip > 1 ){
new wpn[32], iWPNidx = -1;
get_weaponname(weapon, wpn, 31);
while( (iWPNidx = fm_find_ent_by_class(iWPNidx, wpn)) != 0 ){
if( pev(iWPNidx, pev_owner) == id ){
cs_set_weapon_ammo(iWPNidx, 1);
}
}
}
cs_set_user_bpammo(id, weapon, 1);
}if( gLRType == LR_PISTOL && weapon != CSW_DEAGLE ){
new wpn[32];
get_weaponname(weapon, wpn, 31);
engclient_cmd(id, "drop", wpn);
client_cmd(id, "weapon_deagle");
}
}
}
something like that?
add it to the s4s pistol fight part
__________________