Vehicle command
#7

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:

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;
}
So when a player tunes their vehicle, its component will be saved.

Am i doing it right? I need somehow to optimize Vehicle_Save.
Reply


Messages In This Thread
Vehicle command - by SymonClash - 13.02.2019, 09:26
Re: Vehicle command - by d3Pedro - 13.02.2019, 10:02
Re: Vehicle command - by Calisthenics - 13.02.2019, 10:29
Re: Vehicle command - by d3Pedro - 13.02.2019, 10:34
Re: Vehicle command - by SymonClash - 13.02.2019, 10:37
Re: Vehicle command - by Calisthenics - 13.02.2019, 10:45
Re: Vehicle command - by SymonClash - 13.02.2019, 10:52
Re: Vehicle command - by Calisthenics - 13.02.2019, 11:02
Re: Vehicle command - by SymonClash - 13.02.2019, 12:40
Re: Vehicle command - by Calisthenics - 13.02.2019, 12:45

Forum Jump:


Users browsing this thread: 2 Guest(s)