06.09.2011, 23:01
(
Последний раз редактировалось dowster; 06.09.2011 в 23:40.
)
Quote:
Are you possibly thinking about making getvehiclepaintjob etc too? that would be nice ;\
|
Edit: I deem this impossible to script accurately because the OnVehiclePaintjob gets called if you view a piantjob according to the wiki, so it would mean that it sets the paintjob to whatever was viewed
Edit: after tough thinking i decided to just post the script I had already written, not yet tested, i left in the Modshop detection but comment it out. Thanks ryder because i had looked at what your script for the vehicle colors did to get some hints for this one.
pawn Код:
//GetPaintjob
new veh_paintjob_array[MAX_VEHICLES];
#define ChangeVehiclePaintjob(%1,%2); \
veh_paintjob_array[(%1 - 1)] = %2; \
ChangeVehiclePaintjob( %1, %2);
// Uncomment the following comment block to enable paintjob detection (Not very accurate) for piantjobs set in modshops
/*
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
veh_paintjob_array[(vehicleid - 1)] = paintjobid;
old_OnVehiclePaintjob( playerid, vehicleid, paintjobid);
return 1;
}
forward old_OnVehiclePaintjob(playerid, vehicleid, paintjobid);
#define OnVehiclePaintjob old_OnVehiclePaintjob
*/
//stock GetVehiclePaintjob(vehicleid) { return veh_paintjob_array[(vehicleid - 1)]; }
#define GetVehiclePaintjob(%1); veh_paintjob_array[(%1 - 1)];
#define DestroyVehicle(%1, \
veh_paintjob_array[(vehicleid - 1)] = 0;\
DestroyVehicle( %1,