Hooking CreateVehicle
#1

SOLVED

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
However, the hook doesn't seem to get called. Am I doing it wrong, or is hooking this function not plausible?
Reply


Messages In This Thread
[SOLVED] Hooking CreateVehicle - by Scenario - 19.03.2013, 14:03
Re: Hooking CreateVehicle - by Misiur - 19.03.2013, 14:05
Re: Hooking CreateVehicle - by Scenario - 19.03.2013, 14:20

Forum Jump:


Users browsing this thread: 2 Guest(s)