if(PlayerInfo[playerid][pVehicle1] != 0)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
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);
}
}
The vehicle must be re-spawned or re-streamed for the changes to take effect. |
stock SetVehicleNumberPlateEx(vehicleid, plate[])
{
new return;
return = SetVehicleNumberPlate(vehicleid, plate);
SetVehicleToRespawn(vehicleid);
return return;
}