#1

Is this correct

pawn Код:
new OldScore[MAX_PLAYERS];

stock SetPlayerScoreEx(playerid, score)
{
    OldScore[playerid] = GetPlayerScore(playerid);
    return SetPlayerScore(playerid, score);
}
   
#if defined _ALS_SetPlayerScore
    #undef SetPlayerScore
#else
    #define _ALS_SetPlayerScore
#endif

#define SetPlayerScore SetPlayerScoreEx
Reply
#2

Yes, why didn't you test it yourself?
Reply
#3

im not on my pc!

im on my GF's PC :P
Reply
#4

Oh okay, been there done that. lol

Here's how you hook a callback also:

pawn Код:
public OnGameModeInit() {
    return CallLocalFunction("OnGameModeInitEx", "");
}

#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit OnGameModeInitEx
forward OnGameModeInitEx();
Then in gamemode.pwn:

pawn Код:
public OnGameModeInit() {
    return true;
}
Reply
#5

My GF's PC dont have any pawno and Gta san MP :P

BTW i meant to hook the function not the publics or something else
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)