Vehicle command
#9

Ok tested the command. The vehicle gets inserted in DB but it doesn't create IG.

It creates just the label that shows "VehicleName - For Sale (Price)".

pawn Код:
stock Vehicle_Refresh(vid)
{
    if(vid != -1 && VehicleData[vid][vehicleExists] && VehicleData[vid][vehicleOwned] == 0)
    {
        static string[128];

        if(IsValidDynamic3DTextLabel(VehicleData[vid][vehicleLabel])) DestroyDynamic3DTextLabel(VehicleData[vid][vehicleLabel]);

        VehicleData[vid][vehicleCreate] = CreateVehicle(vid, VehicleData[vid][vehiclePos][0], VehicleData[vid][vehiclePos][1], VehicleData[vid][vehiclePos][2], VehicleData[vid][vehiclePos][3], VehicleData[vid][vehicleColorOne], VehicleData[vid][vehicleColorOne], 10);

        format(string, sizeof(string), "%s - For Sale (%d)", VehicleData[vid][vehicleName], VehicleData[vid][vehiclePrice]);
        VehicleData[vid][vehicleLabel] = CreateDynamic3DTextLabel(string, -1, VehicleData[vid][vehiclePos][0], VehicleData[vid][vehiclePos][1], VehicleData[vid][vehiclePos][2], 15.0, INVALID_VEHICLE_ID, INVALID_PLAYER_ID, 0, VehicleData[vid][vehicleWorld], VehicleData[vid][vehicleInterior]);

        UpdateDynamic3DTextLabelText(VehicleData[vid][vehicleLabel], -1, string);
    }
    return 1;
}
What's wrong?
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: 1 Guest(s)