White Fang, now try to disable that cvar. Then, see different.
Instinctpt1, I will test it in my local server and give you the result.
Edit: After test it. There is only small errors in your code. You just need to enable below cvar:
Code:
g_iWeaponDrop = register_cvar("spr_weapon_drop", "1") // 0; Prevent players to drop any weapons || 1; Allow players to drop current war weapon
Set it to "1" instead "0".
This is because the code to malfunction other weapon is being checked using this cvar. See below:
Code:
// Credit to ConnorMcLeod: https://forums.alliedmods.net/showpost.php?p=1238819&postcount=47
public cs_war_WeaponsDeploy(iWeapon)
{
if(pev_valid(iWeapon) == 2)
{
if(g_bInWar)
{
if(get_pcvar_num(g_iWeaponDrop))
{
new iId = get_pdata_int(iWeapon, m_iId, XO_WEAPONS)
if(iId != g_WeaponIndex)
{
set_pdata_float(iWeapon, m_flNextPrimaryAttack, 99999.0, XO_WEAPONS)
set_pdata_float(iWeapon, m_flNextSecondaryAttack, 99999.0, XO_WEAPONS)
}
}
}
else if(g_bLastRoundIsWar)
{
set_pdata_float(iWeapon, m_flNextPrimaryAttack, 0.0, XO_WEAPONS)
set_pdata_float(iWeapon, m_flNextSecondaryAttack, 0.0, XO_WEAPONS)
}
}
}
If you want to prevent weapon drop, yet want to have malfunction feature, you can remove the weapon drop cvar check in above code. Then, it will be as below:
Code:
// Credit to ConnorMcLeod: https://forums.alliedmods.net/showpost.php?p=1238819&postcount=47
public cs_war_WeaponsDeploy(iWeapon)
{
if(pev_valid(iWeapon) == 2)
{
if(g_bInWar)
{
new iId = get_pdata_int(iWeapon, m_iId, XO_WEAPONS)
if(iId != g_WeaponIndex)
{
set_pdata_float(iWeapon, m_flNextPrimaryAttack, 99999.0, XO_WEAPONS)
set_pdata_float(iWeapon, m_flNextSecondaryAttack, 99999.0, XO_WEAPONS)
}
}
else if(g_bLastRoundIsWar)
{
set_pdata_float(iWeapon, m_flNextPrimaryAttack, 0.0, XO_WEAPONS)
set_pdata_float(iWeapon, m_flNextSecondaryAttack, 0.0, XO_WEAPONS)
}
}
}