25.04.2012, 09:11
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:
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(playerid, index, modelid, bone, Float:fOffsetX=0.0, Float:fOffsetY=0.0, Float:fOffsetZ=0.0, Float:fRotX=0.0, Float:fRotY=0.0, Float:fRotZ=0.0 Float:fScaleX=0.0, Float:fScaleY=0.0, Float:fScaleZ=0.0, materialcolor1=0, materialcolor2=0)
{
SetPlayerAttachedObject(playerid, index, modelid, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ, materialcolor1, materialcolor2);
CallRemoteFunction("OnSetPlayerAttachedObjectToPlayer", "dd", playerid,index);
}
#if defined _ALS_SetPlayerAttachedObject
#undef SetPlayerAttachedObject
#else
#define _ALS_SetPlayerAttachedObject
#endif
#define SetPlayerAttachedObject N_SetPlayerAttachedObject