well it is an pretty confusing one. what red_bull mentioned I was aware off.
lets say I do this
PHP Code:
public anticrashserver(id)
{
new num;
new weapons[32];
get_user_weapons(id, weapons, num);
if (num == 1)
{
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
I go into an hldm game, I spawn with glock & crowbar.
as I move I pick up weapons from the ground i.e. gauss,rpg,mp5.
then I execute the drop command as many times as I can.
I will be left with one weapon in my hand, works perfectly.
now the same thing I go into hldm game, spawn etc
but along the way I pick up gauss,rpg,mp5,
tripmine.
then I execute the drop command as many times as I can.
I will be left with zero weapons in hand.
why? I dont know.
think because weapon_tripmine (weapon_satchel and snarks) are not recognized as weapons I assume by amxmodx core but as
ammo.
the best fix I can think of temporarily for this is
PHP Code:
public anticrashserver(id)
{
new num;
new weapons[32];
get_user_weapons(id, weapons, num);
if (num == 2) <----
{
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
making the odds less probable, since now you will be needing weapon_tripmine along with weapon_satchel in order for you to be able to drop all weapons.
but that is no fix ofcourse