16.09.2009, 21:29
This seems to compile fine (haven't yet had time to test), but was wondering if this is valid to do. Basically, instead of making a whole new function, I thought, why not just redefine the current one so it is still compatible with my script. I've seen it done with callbacks, but have yet to see it done with native functions.
This way it checks if they are an admin according to the script, or if they are logged into RCON.
pawn Код:
#define IsPlayerAdmin Stock_IsPlayerAdmin
#define My_IsPlayerAdmin IsPlayerAdmin
stock My_IsPlayerAdmin(playerid) return (PlayerInfo[playerid][pAdmin] > 0 || CallLocalFunction("Stock_IsPlayerAdmin", "i", playerid));
forward Stock_IsPlayerAdmin(playerid);

