13.02.2019, 12:40
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)".
What's wrong?
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;
}