You have missed the fact that the forward won't pass any player id, but weapon id.
Either you find the weapon offset m_pPlayer (could be the same as for cs1.6), either you retrieve the id using pev_owner.
Try using
RegisterHam(Ham_Item_Deploy, Knife_Names[i], "Knife_Deploy", 1)
PHP Code:
public Knife_Deploy( iEnt )
{
new id = pev(iEnt, pev_owner)
for( new i=1; i<=100; i++)
{
if( get_pdata_cbase_safe(iEnt, i) )
{
client_print(id, print_chat, "Weapon Offset m_pPlayer could be %d", i)
}
}
}
Try this on windows, when you have found the offset, you can use this to retrieve player id :
Code:
#define m_pPlayer ??? // value you have found
public Knife_Deploy( iEnt )
{
new id = get_pdata_cbase(iEnt, m_pPlayer, 4) // you will have to check that diff between win32 and linux is 4 for weapons entities
On cs1.6, value is 41, could be the same on dod.
__________________