Hooking a function
#1

Good day, I have a problem with hooking any samp function. Its just doesnt get called.

Code I am using:

pawn Код:
stock _ALT_SetPlayerPos(playerid, Float: fX, Float: fY, Float: fZ)
{
    printf("a");
    stopChecking[playerid] = true;
   
    acPos[playerid][0] = fX;
    acPos[playerid][1] = fY;
    acPos[playerid][2] = fZ;
   
    SetPlayerPos(playerid, fX, fY, fZ);
   
    stopChecking[playerid] = false;
    return true;
}

#if defined _ALS_SetPlayerPos
    #undef SetPlayerPos
#else
    #define _ALS_SetPlayerPos
#endif
#define SetPlayerPos _ALT_SetPlayerPos
There is no any print message when I use SetPlayerPos
Reply
#2

Bump
Reply
#3

stock SetPlayerPosEx(playerid, Float: fX, Float: fY, Float: fZ)
{
printf("a");
stopChecking[playerid] = true;

acPos[playerid][0] = fX;
acPos[playerid][1] = fY;
acPos[playerid][2] = fZ;

SetPlayerPos(playerid, fX, fY, fZ);

stopChecking[playerid] = false;
return true;
}

#define SetPlayerPos SetPlayerPosEx

In top of your script ;/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)