03.09.2011, 12:03
Hey, im wondering... is it possible to redefine functions ?
Something like this:
Only this seems to freeze the pawn compiler since it is doing a infinite loop (_INCLUDE_ban probably calls the function Ban again instead of the real one making it calling himself infinite times...)
Something like this:
pawn Код:
#include <a_samp>
//Renaming Ban to _INCLUDE_ban
#define _INCLUDE_ban Ban
//redefining Ban to another function
#define Ban(%0) CallLocalFunction("OnPlayerGetBanned","i",%0);_INCLUDE_ban(%0)
public OnPlayerConnect(playerid)
{
Ban(playerid); //testing
return 1;
}
forward OnPlayerGetBanned(playerid);
public OnPlayerGetBanned(playerid)
{
return 1;
}