Raised This Month: $ Target: $400
 0% 

Ham_Item_Deploy


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-18-2009 , 14:08   Re: Ham_Item_Deploy
Reply With Quote #2

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_DeployiEnt )
{
    new 
id pev(iEntpev_owner)
    for( new 
i=1i<=100i++)
    {
        if( 
get_pdata_cbase_safe(iEnti) )
        {
            
client_print(idprint_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.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-18-2009 at 14:15.
ConnorMcLeod is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode