08.06.2011, 21:09
Hi all,
I got this weird paintjob problem. When I apply the paintjob with ChangeVehiclePaintjob on a CreateVehicle(...) it flashes. I mean it gets the paintjob very shortly and then returns to its old color..
The colorIDs I'm using on the car are for both primary and secundary 0, black. Here is the code
Does anybody know why this happens?
I got this weird paintjob problem. When I apply the paintjob with ChangeVehiclePaintjob on a CreateVehicle(...) it flashes. I mean it gets the paintjob very shortly and then returns to its old color..
The colorIDs I'm using on the car are for both primary and secundary 0, black. Here is the code
pawn Код:
stock AttachVehicleComponents(vehicleid, playerid){
for(new i = 9; i <= 17; i++){
if(VehStatsInt[playerid][i] > 0) AddVehicleComponent(vehicleid, VehStatsInt[playerid][i]);
}
if(VehStatsInt[playerid][1] == 0) ChangeVehiclePaintjob(vehicleid, VehStatsInt[playerid][2]);
return 1;
}
stock SpawnSelectedVehicle(playerid, listid){
if(VehStatsInt[playerid][3] == 0) return SendClientMessage(playerid, COLOR_WHITE, "(( [SERVER]: That vehicle is allready spawned. ))");
new freeslot = GetFreeVehSlot(playerid);
if(freeslot >= 0){
ActiveVehicles[playerid][freeslot] = CreateVehicle(VehStatsInt[playerid][0] + 400, VehStatsFloat[playerid][0], VehStatsFloat[playerid][1], VehStatsFloat[playerid][2], VehStatsFloat[playerid][3], VehStatsInt[playerid][1], VehStatsInt[playerid][2], 2628000);
AttachVehicleComponents(ActiveVehicles[playerid][freeslot], playerid); // and paintjob
// VehStatsInt[playerid][3] = 0; // Sets vehicle status to unparked (spawned)
}
SaveVehStats(playerid, listid);
return 1;
}