13.12.2012, 19:55
Quote:
Thanks LarzI, I've read this + two tutorials about hook but what I've noticed is that they shows how to hook a callback. I don't know how to do it for a function. Or is it the same way?
|
Edit: I've only seen usage of ALS with callbacks in includes like zcmd and such, but it's no harm testing it with functions?
Example:
pawn Код:
#if defined _ALS_PutPlayerInVehicle
#undef PutPlayerInVehicle
#else
#define _ALS_PutPlayerInVehicle
#endif
#define PutPlayerInVehicle sth1_PutPlayerInVehicle
pawn Код:
#if defined _ALS_PutPlayerInVehicle
#undef PutPlayerInVehicle
#else
#define _ALS_PutPlayerInVehicle
#endif
#define PutPlayerInVehicle sth2_PutPlayerInVehicle