HUD
Functions

Player: CD add Vehicle

This can be used to gift a player a certain vehicle.

Used in: VCMod Main addon.

Server Entity Player:VC_CD_addVehicle(String ID)

Arguments

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

Example

concommand.Add("VC_CD_addVehicle", 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
			print("Congratulations, you already own this vehicle.")
		else
			ply:VC_CD_addVehicle(entID)
			print("You now own this vehicle, Congratulations!")
		end
	else
		print("Not in any vehicle.")
	end
end)
Page modified:
...2018-11-02 09:24:35