Ok so i have tried a few different things and cant figure out what it actually returns.
ive tried using ID offset to get CSW and that didnt work. so... what does it actually return? i cant seem to find much info on it. and the only way i have an example of it being used is..
PHP Code:
stock StripUserWeapons(id)
{
new iC4Ent = get_pdata_cbase(id, OFFSET_C4_SLOT);
if( iC4Ent > 0 )
{
set_pdata_cbase(id, OFFSET_C4_SLOT, FM_NULLENT);
}
strip_user_weapons(id);
give_item(id, "weapon_knife");
set_pdata_int(id, OFFSET_PRIMARYWEAPON, 0);
if( iC4Ent > 0 )
{
set_pev(id, pev_weapons, pev(id, pev_weapons) | (1<<CSW_C4));
set_pdata_cbase(id, OFFSET_C4_SLOT, iC4Ent);
cs_set_user_bpammo(id, CSW_C4, 1);
cs_set_user_plant(id, 1);
}
return PLUGIN_HANDLED;
}