i have 2 plugins
in first plugin it should give T team smokegernade but because a part of code in second plugin the somkegernade don't added to player.
here is the 2 codes.
first plugin
PHP Code:
give_item(id, "weapon_smokegrenade");
second plugin
PHP Code:
RegisterHam(Ham_AddPlayerItem, "player", "CBasePlayer_AddPlayerItem");
public CBasePlayer_AddPlayerItem(id, iWeapon)
{
if(get_user_human(id))
return HAM_IGNORED;
if(ExecuteHam(Ham_Item_GetWeaponPtr, iWeapon) != iWeapon || cs_get_weapon_id(iWeapon) == CSW_KNIFE)
return HAM_IGNORED;
set_pev(id, pev_viewmodel2, g_zombie_hands_models[iClass[id]]);
set_pev(id, pev_weaponmodel2, "");
entity_set_int(iWeapon, EV_INT_flags, entity_get_int(iWeapon, EV_INT_flags) | FL_KILLME);
SetHamReturnInteger(0);
return HAM_SUPERCEDE;
}
if i delete CBasePlayer_AddPlayerItem in second plugin everything works well.
i tried to edit the second code it works but set_pev(id, pev_viewmodel2, g_zombie_hands_models[iClass[id]]); is not working
__________________