19.03.2013, 14:03
SOLVED
As the title of the thread suggests, I want to hook the CreateVehicle function. So far, this is the code I've got:
However, the hook doesn't seem to get called. Am I doing it wrong, or is hooking this function not plausible?
As the title of the thread suggests, I want to hook the CreateVehicle function. So far, this is the code I've got:
pawn Код:
stock realCreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay)
{
new vehicleid = CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
// other code here
return vehicleid;
}
#if defined _ALS_CreateVehicle
#undef CreateVehicle
#else
#define _ALS_CreateVehicle
#endif
#define CreateVehicle realCreateVehicle