Could someone point me out why Ham_RemovePlayerItem doesn't work in this piece of code? And that engclient_cmd too, I couldn't figure out why it doesn't work so I commented out the lines.
PHP Code:
RegisterHam(Ham_AddPlayerItem, "player", "Player_AddPlayerItem")
public Player_AddPlayerItem(client, WeapIndex)
{
if (ExecuteHam(Ham_Item_ItemSlot, WeapIndex) == SLOT_PRIMARY)
{
// new szClassname[16]
// pev(WeapIndex, pev_classname, szClassname, charsmax(szClassname))
//engclient_cmd(client, "drop", szClassname)
ExecuteHam(Ham_RemovePlayerItem, client, WeapIndex)
}
return HAM_IGNORED
}
Note: Reason why I don't block it with HAM_SUPERCEDE is because I want players to drop the weapons so other players could pick it up.