« [ GameMode ] ADM Script v1.0
Sunshine Auto's - by rulk
[ #D~ Tools ] Textdraw & Sprite Editor! »

Kewun

  • Hero Member
  • Posts: 785
Re: Sunshine Auto's - by rulk
« Reply #90, on November 1st, 2016, 05:08 PM »
fixed
but another problem popped up
i add a car using /addcar carmodel colr1 colr2
works fine
but when ido /savecar, it saves in sunshine database
server restart - bam
vehicle names messed up, police vehicle is esperanto, some other police vehicle is sanchez, stallion is banshee
how i can fix this?

Mahmoud Tornado

  • Full Member
  • Posts: 220
Re: Sunshine Auto's - by rulk
« Reply #91, on September 10th, 2017, 08:13 AM »
Try This In It Too

Code: [Select]
function onPlayerEnterVehicle( player, veh, isPassenger )
{
local vehicle = player.Vehicle;

local output = @"Model: " + MyVehicles[ vehicle.ID ].VehicleModel + " - "  +
  "ID: " + MyVehicles[ vehicle.ID ].VehicleID + " - "  +
"Type: " + MyVehicles[ vehicle.ID ].VehicleCat    + " - "  +
"Price: " + MyVehicles[ vehicle.ID ].VehiclePrice;


local
      IsPurchased MyVehicles[ vehicle.ID ].IsPurchased.len() > 0 ? MyVehicles[ vehicle.ID ].IsPurchased  : "For Sale",
      IsShared = MyVehicles[ vehicle.ID ].IsShared.len()    > 0 ? MyVehicles[ vehicle.ID ].IsShared     : "Not Shared";


output = output + " - " + "Owner: " + IsPurchased + " - " + "Sharer: " + IsShared;

MessagePlayer( output, player );
}

« [ GameMode ] ADM Script v1.0
[ #D~ Tools ] Textdraw & Sprite Editor! »