Код:
if(PlayerInfo[playerid][pVehicle1] != 0)
{
new model1 = PlayerInfo[playerid][pVehicle1Model];
new Float:car1x = PlayerInfo[playerid][pVehicle1X];
new Float:car1y = PlayerInfo[playerid][pVehicle1Y];
new Float:car1z = PlayerInfo[playerid][pVehicle1Z];
new Float:car1c = PlayerInfo[playerid][pVehicle1C];
new car1color1 = PlayerInfo[playerid][pVehicle1Color1];
new car1color2 = PlayerInfo[playerid][pVehicle1Color2];
new car1lock = PlayerInfo[playerid][pVehicle1Lock];
personalcar1[playerid] = CreateVehicle(model1, car1x, car1y, car1z, car1c, car1color1, car1color2, 999999);
SetVehicleNumberPlate(personalcar1[playerid], PlayerInfo[playerid][pVehicle1Plate]);
if(car1lock != 0)
{
GetVehicleParamsEx(personalcar1[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(personalcar1[playerid], engine, lights, alarm, 1, bonnet, boot, objective);
}
}
if(PlayerInfo[playerid][pVehicle2] != 0)
{
new model2 = PlayerInfo[playerid][pVehicle2Model];
new Float:car2x = PlayerInfo[playerid][pVehicle2X];
new Float:car2y = PlayerInfo[playerid][pVehicle2Y];
new Float:car2z = PlayerInfo[playerid][pVehicle2Z];
new Float:car2c = PlayerInfo[playerid][pVehicle2C];
new car2color1 = PlayerInfo[playerid][pVehicle2Color1];
new car2color2 = PlayerInfo[playerid][pVehicle2Color2];
new car2lock = PlayerInfo[playerid][pVehicle2Lock];
personalcar2[playerid] = CreateVehicle(model2, car2x, car2y, car2z, car2c, car2color1, car2color2, 999999);
SetVehicleNumberPlate(personalcar2[playerid], PlayerInfo[playerid][pVehicle2Plate]);
if(car2lock != 0)
{
GetVehicleParamsEx(personalcar2[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(personalcar2[playerid], engine, lights, alarm, 1, bonnet, boot, objective);
}
}
if(PlayerInfo[playerid][pVehicle3] != 0)
{
new model3 = PlayerInfo[playerid][pVehicle3Model];
new Float:car3x = PlayerInfo[playerid][pVehicle3X];
new Float:car3y = PlayerInfo[playerid][pVehicle3Y];
new Float:car3z = PlayerInfo[playerid][pVehicle3Z];
new Float:car3c = PlayerInfo[playerid][pVehicle3C];
new car3color1 = PlayerInfo[playerid][pVehicle3Color1];
new car3color2 = PlayerInfo[playerid][pVehicle3Color2];
new car3lock = PlayerInfo[playerid][pVehicle3Lock];
personalcar3[playerid] = CreateVehicle(model3, car3x, car3y, car3z, car3c, car3color1, car3color2, 999999);
SetVehicleNumberPlate(personalcar3[playerid], PlayerInfo[playerid][pVehicle3Plate]);
if(car3lock != 0)
{
GetVehicleParamsEx(personalcar3[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(personalcar3[playerid], engine, lights, alarm, 1, bonnet, boot, objective);
}
}
}