Hi coders,
Now i want to use this method:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
public plugin_init()
{
register_plugin("UC Other Method", "0.0.1", "wbyokomo")
register_clcmd("say /uc", "CmdUC")
}
public CmdUC(id)
{
if(!is_user_alive(id)) return;
strip_user_weapons(id)
give_item(id, "weapon_knife")
new wpn = give_item(id, "weapon_mp5navy")
if(wpn != -1)
{
cs_set_weapon_ammo(wpn, 32767) //set infinity clip
cs_set_user_bpammo(id, CSW_MP5NAVY, 0) //prevent reloading
}
}
//But the problem is when someone get a new weapon, i need to check all current weapon enyity and set infinity clip like method above.
//So what kind of forward that suitable to hook when player get a new weapons?
//I don't want to use CurWeapon message, it's called to often.
//Is "Ham_Item_AttachToPlayer" good to use?
So what kind of forward that suitable to hook when player get a new weapons?
Thanks.
__________________