Thanks , it worked , but to strip
USP/GLOCK18 this is valid?
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
#define PLUGIN "Glock is Block"
#define VERSION "1.0"
#define AUTHOR "Krtola"
const OFFSET_LINUX_WEAPONS = 4
const OFFSET_WEAPONOWNER = 41
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Item_Deploy, "weapon_glock18", "Ham_Deploy", 1);
RegisterHam(Ham_Item_Deploy, "weapon_usp", "Ham_Deploy", 1);
}
stock fm_cs_get_weapon_ent_owner(ent)
{
return get_pdata_cbase(ent, OFFSET_WEAPONOWNER, OFFSET_LINUX_WEAPONS)
}
public Ham_Deploy(ent)
{
static id; id = fm_cs_get_weapon_ent_owner(ent)
if (!pev_valid(id))
return;
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_knife")
}
__________________