Hooking functions
#1

I want to hook CreateVehicle to print a console message every time it's called.

Код:
stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay, addsiren=0)
{
	print("vehicle spawned from hook");
	return CreateVehicle(modelid, x, y, z, angle, color1, color2, respawn_delay, addsiren);
}

#define CreateVehicle CreateVehicleEx
This is my code now, but when I call CreateVehicle, the message is not printed in the console.

Any ideas?
Reply


Messages In This Thread
Hooking functions - by Shetch - 19.06.2015, 23:33
Re: Hooking functions - by X337 - 20.06.2015, 03:50

Forum Jump:


Users browsing this thread: 1 Guest(s)