08.02.2017, 06:30
You can simply hook AddStaticVehicleEx function.
Example:
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

