13.02.2019, 10:52
Ok compiled without error. Give me a tip. I saw you just added Vehicle_Refresh and not too Vehicle_Save, since i use that function to save vehicle informations, can you suggest me a way to optimize it? Basically i'm using it in this way:
So when a player tunes their vehicle, its component will be saved.
Am i doing it right? I need somehow to optimize Vehicle_Save.
pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
if(IsPlayerInVehicle(playerid, VehicleData[vehicleid][vehicleDBID]))
{
if(strcmp(VehicleData[vehicleid][vehicleOwner], ReturnName(playerid, 1)))
{
for(new x; x < 14; x++)
{
if(GetVehicleComponentType(componentid) == x) VehicleData[vehicleid][vehicleMod][x] = componentid;
}
Vehicle_Save(vehicleid);
}
}
return 1;
}
Am i doing it right? I need somehow to optimize Vehicle_Save.