I find a 2 ways on the forum for this issue:
PHP Code:
1. register_forward(FM_SetModel, "Fw_SetModel")
2. RegisterHam( Ham_Touch, "weaponbox", "WeaponBox_Touch", 1 );
But they not always appropriate. If you use some plugins
as real nade drop or drop all weapons on die and etc. the weapon (or some weapon) still on map...
Need a new way for this. Simple idea:
PHP Code:
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
set_task((randomnum(1.0, 3.0), "remove_weap", _, _, _, "b") // do not remove all weapons at once. More realistic! :)
}
public remove_weap()
{
// find a weapon on map (prefix "w_") - i don't know, just a suggest
// remove weapon from map (it does not matter how it got on the map)
// INCLUDE: all weapons (shotguns, pistols, snipers, etc), HE, SG, FB nades and shield
// EXCLUDE: planted / dropped c4, defuse kit
}
Who can help with this?
__________________