HUD
Functions

Vehicle: set States

Allows to set the VCMod feature state info table.

Used in: VCMod Main, VCMod ELS addons.

Shared Entity Vehicle:VC_setStates(Table tbl)

Arguments

1. Table tbl; Table
Table of state data.

Example

concommand.Add("VC_SetStates_Test", function(ply)
	if !IsValid(ply) then print("Only for players.") return end

	local ent = ply:GetVehicle()
	if IsValid(ent) then
		local states = ent:VC_getStates()
		states.HornOn = true
		ent:VC_setStates(states)
		print("Altering vehicles states.")
	else
		print("Invalid entity.")
	end
end)
Page modified:
...2018-11-02 09:24:42