All pastes #388996 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-10 13:14 UTC
rendered paste body
public fw_touch(touched,toucher)
{
	if(!pev_valid(toucher)) return FMRES_IGNORED;
	
	new classname[32];
	pev(toucher,pev_classname,classname,31);
	
	new bounc = pev(toucher,pev_iuser1);
	
	if(equal(classname,"fake_molotov") && touched == 0 &&  bounc == 0)
	{
		set_pev(toucher,pev_iuser1);
		return FMRES_IGNORED;
	}
	
	if (!pev_valid(touched) || !is_user_connected(toucher) )
	return FMRES_IGNORED;
	
	pev(touched,pev_classname,classname,31);
	
	if(equal(classname,"fake_molotov") && user_has_weapon(toucher,"weapon_hegrenade" )) 
	{
		give_item(toucher,"weapon_hegrenade");
		engfunc(EngFunc_RemoveEntity,touched);
		
		return FMRES_IGNORED;
	}
	
	return FMRES_IGNORED;
}