04.06.2013, 00:36
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"
please note that i dont have the source code of the main gamemode thats why i use a filterscript
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