[HELP] color instead paintjob -
Luca12 - 10.06.2014
Hello I have a problem with this. So I go to SF tuning garage and put paintjob id 0 on sultan and know when I park vehicle it should be set paintjob but instead of paintjob is set car color so I wonder is it a way to make if check on park part to see if car has a paintjob then it park vehicle just with paintjob and else if if vehicle no paintjob then it just park vehicle with car colors if you know what I mean? thanks
Re: [HELP] color instead paintjob -
Laure - 10.06.2014
Make sure your server is saving your vehicles PaintJob and please show your /park command too.
Re: [HELP] color instead paintjob -
Luca12 - 10.06.2014
it saves all of all of componnets are stay like spoilers front bumpers etc.. and in vehicle column paintjob is set to 0 I mean like paintjob id. When I park car I for second see that paintjob then it's set a color to vehicle and in park part is just creatingvehicle, thanks.
CreateVehicle(Modelid,x,y,z,rotation,color 1,color 2,respawn delay);
firts here is onvehiclespawn
pawn Код:
public OnVehicleSpawn(vehicleid)
{
SetVehicleHealth(vehicleid,999.99);
for(new i; i < sizeof VInfo; i++)
{
if(vehicleid == VInfo[i][vownedvehicle]) TuneCar(vehicleid,i);
}
return 1;
}
and here is public tunecar
pawn Код:
forward TuneCar(vehid,v);
public TuneCar(vehid,v)
{
if(VInfo[v][vKomponenta1] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta1]);
}
if(VInfo[v][vKomponenta2] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta2]);
}
if(VInfo[v][vKomponenta3] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta3]);
}
if(VInfo[v][vKomponenta4] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta4]);
}
if(VInfo[v][vKomponenta5] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta5]);
}
if(VInfo[v][vKomponenta6] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta6]);
}
if(VInfo[v][vKomponenta7] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta7]);
}
if(VInfo[v][vKomponenta8] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta8]);
}
if(VInfo[v][vKomponenta9] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta9]);
}
if(VInfo[v][vKomponenta10] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta10]);
}
if(VInfo[v][vKomponenta11] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta11]);
}
if(VInfo[v][vKomponenta12] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta12]);
}
if(VInfo[v][vKomponenta13] > 0)
{
AddVehicleComponent(vehid,VInfo[v][vKomponenta13]);
}
if(VInfo[v][vPaintJob] > -1) in that code here all of this part is set a paintjob to vehicle
{
ChangeVehiclePaintjob(vehid,VInfo[v][vPaintJob]);
}
}
Re: [HELP] color instead paintjob -
Laure - 10.06.2014
What will tune car do? I meant public variable thats saves he players vehicle paint job, vehicles position,
Re: [HELP] color instead paintjob -
Luca12 - 10.06.2014
I don't understand
Re: [HELP] color instead paintjob -
Laure - 10.06.2014
Please the /park command
Re: [HELP] color instead paintjob -
Luca12 - 10.06.2014
pawn Код:
case 0:
{
new Float:Pozf[4];
GetVehiclePos(VInfo[a][ownedvehicle],Pozf[0],Pozf[1],Pozf[2]);
GetVehicleZAngle(VInfo[a][ownedvehicle],Pozf[3]);
VInfo[a][hPozX] = Pozf[0];
VInfo[a][hPozY] = Pozf[1];
VInfo[a][hPozZ] = Pozf[2];
VInfo[a][hPozA] = Pozf[3];
DestroyVehicle(VInfo[a][vownedvehicle]);
VInfo[a][vownedvehicle] = CreateVehicle_H(VInfo[a][vModel],VInfo[a][vPozX],VInfo[a][vPozY],VInfo[a][vPozZ],VInfo[a][vPozA],VInfo[a][vcolor1],VInfo[a][vcolor2],300000);
SetVehicleToRespawn(VInfo[a][ownedvehicle]);
}
this is response park from dialog.