hooking native function in a filterscript
#1

i was making a filterscript for a gamemode i needed to hook PlayerSpectatePlayer in the filterscript but it just doesnt work .. when i type /spec [id] (which is a command in the main gamemode) it doesnt print "hooking"

pawn Код:
// this is in filterscript
stock _ALT_PlayerSpectatePlayer(playerid, targetplayerid, mode = SPECTATE_MODE_NORMAL)
{
    print("hooking")
    specID[playerid] = targetplayerid;
    return PlayerSpectatePlayer(playerid, targetplayerid, mode);
}

#if defined _ALS_PlayerSpectatePlayer
    #undef PlayerSpectatePlayer
#else
    #define _ALS_PlayerSpectatePlayer
#endif
#define PlayerSpectatePlayer _ALT_PlayerSpectatePlayer
please note that i dont have the source code of the main gamemode thats why i use a filterscript
Reply


Messages In This Thread
hooking native function in a filterscript - by ZoZZ - 04.06.2013, 00:36
Re: hooking native function in a filterscript - by SuperViper - 04.06.2013, 01:22

Forum Jump:


Users browsing this thread: 1 Guest(s)