08.09.2013, 15:14
I've had this in the script since the I began editing the script. But when I changed the vehicle system I wanted to change this too so I could still edit the vehicles. But now it wont work anymore. I've set the variables right but still, nothing.
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
if(IsAnOwnableCar(idcar))
{
format(string, sizeof(string), "Carid: %d", idcar);
SendClientMessage(playerid, COLOR_GRAD2, string);
if(proplev >= 0)
{
if(strcmp(x_job,"color1",true) == 0)
{
CarInfo[idcar][cColorOne] = proplev;
ChangeVehicleColor(idcar, proplev, CarInfo[idcar][cColorTwo]);
OnPropUpdate(4,idcar);
RestartCar(idcar);
}
else if(strcmp(x_job,"color2",true) == 0)
{
CarInfo[idcar][cColorTwo] = proplev;
ChangeVehicleColor(idcar, CarInfo[idcar][cColorOne], proplev);
OnPropUpdate(4,idcar);
RestartCar(idcar);
}
else if(strcmp(x_job,"model",true) == 0)
{
if(proplev < 400 || proplev > 611)
{
SendClientMessage(playerid, COLOR_GREY,"* Invalid Model!");
return 1;
}
CarInfo[idcar][cModel] = proplev;
OnPropUpdate(4,idcar);
RestartCar(idcar);
}
else if(strcmp(x_job,"paintjob",true) == 0)
{
CarInfo[idcar][cPaintjob] = proplev;
ChangeVehiclePaintjob(idcar, proplev);
OnPropUpdate(4,idcar);
RestartCar(idcar);
}
else if(strcmp(x_job,"virtualworld",true) == 0)
{
CarInfo[idcar][cVirWorld] = proplev;
SetVehicleVirtualWorld(idcar, proplev);
OnPropUpdate(4,idcar);
RestartCar(idcar);
}
else if(strcmp(x_job,"price",true) == 0)
{
CarInfo[idcar][cPrice] = proplev;
OnPropUpdate(4,idcar);
RestartCar(idcar);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* Unknown Item");
return 1;
}
}
}
}
format(string, sizeof(string), "You've adjusted the: %s to %d.", x_job,proplev);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}