HUD
Functions

Player: CD remove Vehicle

This can be used to take away a players certain vehicle,

Used in: VCMod Main addon.

Server Entity Player:VC_CD_removeVehicle(String ID)

Arguments

1. String ID; Car Dealer vehicle ID
The VCMods car dealer vehicles ID.

Example

concommand.Add("VC_CD_removeVehicle", function()
	local ply = player.GetAll()[1]
	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
			ply:VC_CD_removeVehicle(entID)
			print("Looks like you own this vehicle, or, well, you've used to. All taken way now.")
		else
			print("You do not own this vehicle.")
		end
	else
		print("Not in any vehicle.")
	end
end)
Page modified:
...2020-10-13 12:36:47