13.04.2019, 10:16
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.
This is my code, where is the problem? Thanks in advance!
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

