[HELP]Redefine a native function
#1

i want to redefine the SetPlayerAttachedObject, and when it used i want to call the function "OnSetPlayerAttachedObjectToPlayer(playerid,index) "

I'm not sure how to do this because I have a lot of dexterity with the define and undefine can you help me?

This is a small draft of what I tried to do but it is not correct:
PHP код:
stock N_SetPlayerAttachedObject(playeridindexmodelidboneFloat:fOffsetX=0.0Float:fOffsetY=0.0Float:fOffsetZ=0.0Float:fRotX=0.0Float:fRotY=0.0Float:fRotZ=0.0 Float:fScaleX=0.0Float:fScaleY=0.0Float:fScaleZ=0.0materialcolor1=0materialcolor2=0)
    {
        
SetPlayerAttachedObject(playeridindexmodelidbonefOffsetXfOffsetYfOffsetZfRotXfRotYfRotZfScaleXfScaleYfScaleZmaterialcolor1materialcolor2);
        
CallRemoteFunction("OnSetPlayerAttachedObjectToPlayer""dd"playerid,index);
    }
    
#if defined _ALS_SetPlayerAttachedObject
        #undef SetPlayerAttachedObject
    #else
        #define _ALS_SetPlayerAttachedObject
    #endif
    #define SetPlayerAttachedObject N_SetPlayerAttachedObject 
Reply


Messages In This Thread
[HELP]Redefine a native function - by xX_Simon_Xx - 25.04.2012, 09:11
Re: [HELP]Redefine a native function - by MP2 - 25.04.2012, 09:16
Re: [HELP]Redefine a native function - by xX_Simon_Xx - 25.04.2012, 09:31
Re: [HELP]Redefine a native function - by MP2 - 25.04.2012, 09:53
Re: [HELP]Redefine a native function - by xX_Simon_Xx - 25.04.2012, 10:00
Re: [HELP]Redefine a native function - by MP2 - 25.04.2012, 10:04
Re: [HELP]Redefine a native function - by xX_Simon_Xx - 25.04.2012, 10:07
Re: [HELP]Redefine a native function - by xX_Simon_Xx - 25.04.2012, 12:05

Forum Jump:


Users browsing this thread: 1 Guest(s)