public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
VehicleInfo[vehicleid][vCol1] = color1;
VehicleInfo[vehicleid][vCol2] = color2;
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
VehicleInfo[vehicleid][vCol1] = color1;
VehicleInfo[vehicleid][vCol2] = color2;
ChangeVehicleColor(vehicleid, color1, color2);
return 1;
}
new color1, color2;
GetVehicleColor(Vehicleid, color1, color2)
i have tried in mod shop my car color changes but it does not save in the file
|
stock SaveVehicles(id)
{
new file[64];
format(file, sizeof(file), "Vehicles/%d.ini", id);
new INI:Handle = INI_Open(file);
if(Handle != INI_NO_FILE)
{
INI_WriteString(Handle, "VehicleOwner", VehicleInfo[id][vOwner]);
INI_WriteInt(Handle, "VehicleModel", VehicleInfo[id][vModel]);
INI_WriteInt(Handle, "VehicleColor1", VehicleInfo[id][vCol1]);
INI_WriteInt(Handle, "VehicleColor2", VehicleInfo[id][vCol2]);
INI_WriteFloat(Handle,"VehPosX", VehicleInfo[id][vPosX]);
INI_WriteFloat(Handle,"VehPosY", VehicleInfo[id][vPosY]);
INI_WriteFloat(Handle,"VehPosZ", VehicleInfo[id][vPosZ]);
INI_WriteFloat(Handle,"VehPosA", VehicleInfo[id][vPosA]);
INI_Close(Handle);
}
}
any chance you have some other script which use OnVehicleRespray and you have return 1; in it ?
|
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
VehicleInfo[vehicleid][vCol1] = color1;
VehicleInfo[vehicleid][vCol2] = color2;
new string[128];
format(string, sizeof(string), "Your car color 1 is (%d) and color 2 is (%d)", color1, color2);
SendClientMessageToAll(0xFFFF00FF, string);
return 1;
}