23.06.2014, 20:40
It's random 256. because 255 is a colour if I recall?
Are you sure? look at this
And the bug was still happening?
The vehicles we're using this createvehicle function, it wasn't tested on my static vehicles.. but idk I'll check still.
Are you sure? look at this
pawn Code:
stock k_CreateVehicle(av_modelid, Float: spawn_X, Float: spawn_Y, Float: spawn_Z, Float: z_Angle, color1, color2, respawn_Delay)
{
if(color1 < 0)
color1 = random(256);
if(color2 < 0)
color2 = random(256);
av_modelid = CreateVehicle(av_modelid, spawn_X, spawn_Y, spawn_Z, z_Angle, color1, color2, respawn_Delay);
setVehicleDefaultNumberPlate(av_modelid);
//SetVehicleHealth(av_modelid, MAX_VHEALTH);
#if !defined _YSF_included
format(colorStr, sizeof(colorStr), "%d-%d", color1, color2);
setproperty(_, "", PROPERTY_OFFSET(av_modelid), colorStr);
#endif
CallRemoteFunction("OnVehicleSpawn", "i", av_modelid);
return av_modelid;
}
#if defined _ALS_CreateVehicle
#undef CreateVehicle
#else
#define _ALS_CreateVehicle
#endif
#define CreateVehicle k_CreateVehicle
The vehicles we're using this createvehicle function, it wasn't tested on my static vehicles.. but idk I'll check still.