Get all of data of this specific vehicle ID. This is mostly for checking if a specific player has this specific vehicle purchased or not.
Used in: VCMod Main addon.
Server Entity Player:VC_CD_getOwnedVehicleData(String ID)
1. String ID; Car Dealer vehicle ID
The VCMods car dealer vehicles ID. This is optional, if none is provided it will return a table of owned vehicles instead.
1. Table / nil A table of players car dealer data for a specific car dealer vehicle ID. If a player has not purchased this vehicle it will return nil.
If no Car Dealer Vehicle ID was provided this will return a table of vehicles owned instead.
concommand.Add("VC_CD_getVehicleData", function() local ply = player.GetAll() local ent = ply:GetVehicle() if IsValid(ent) then local data = ply:VC_CD_getVehicleData() local entID = ent:VC_CD_getVehicleID() if ply:VC_CD_getOwnedVehicleData(entID) then print("Congratulations, you already own this vehicle.") else print("You do not own this vehicle.") end else print("Not in any vehicle.") end end)