Function hook problem
#1

Hello everyone!
I tried to hook CreateVehicle function with ALS method, but I just couldn't, it won't work, custom function isn't called, but there is no error saying, that _CreateVehicle is not used.
Code:
_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren=0)
{
	new vehicleid = CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren=0);
	Iter_Add(Vehicles, vehicleid);
	return vehicleid;
}

/*************************|FUNCTION HOOKS|*************************/
#if defined _ALS_CreateVehicle
    #undef CreateVehicle
#else
    #define _ALS_CreateVehicle
#endif
#define CreateVehicle _CreateVehicle
This is my code, where is the problem? Thanks in advance!
Reply


Messages In This Thread
Function hook problem - by Marshas - 13.04.2019, 10:16
Re: Function hook problem - by Marshas - 13.04.2019, 10:58

Forum Jump:


Users browsing this thread: 1 Guest(s)