Easiest way to add huge amount vehicle
#2

You can simply hook AddStaticVehicleEx function.
Example:
Код:
enum e_Vehicle {
	vehiclecolor,
	// ...
}
new Vehicles[MAX_VEHICLES][e_Vehicle];

stock hook_AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay, addsiren=0)
{
	id = AddStaticVehicleEx(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2, respawn_delay, addsiren);
	Vehicles[id][vehiclecolor] = color1;
	return id;
}
#if defined _ALS_AddStaticVehicleEx
	#undef AddStaticVehicleEx
#else
	#define _ALS_AddStaticVehicleEx
#endif

#define AddStaticVehicleEx hook_AddStaticVehicleEx
Reply


Messages In This Thread
Easiest way to add huge amount vehicle - by princejeet1510 - 08.02.2017, 06:25
Re: Easiest way to add huge amount vehicle - by X337 - 08.02.2017, 06:30
Re: Easiest way to add huge amount vehicle - by princejeet1510 - 08.02.2017, 06:38
Re: Easiest way to add huge amount vehicle - by BroZeus - 08.02.2017, 08:24
Re: Easiest way to add huge amount vehicle - by princejeet1510 - 08.02.2017, 08:37
Re: Easiest way to add huge amount vehicle - by princejeet1510 - 08.02.2017, 14:09
Re: Easiest way to add huge amount vehicle - by ranme15 - 08.02.2017, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)