IsTrunkVehicle

From Onset Developer Wiki
Revision as of 16:56, 15 February 2020 by 28days (talk | contribs) (Created page with "{{Info|Lua Helper|Server|-}} {{FuncDescription|Returns boolean based on if the vehicle has accessible trunk.}} {{FuncSyntax|IsTrunkVehicle(vehicleid)}} {{FuncParameters}} {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
IsTrunkVehicle

Type: Lua Helper
Context: Server
Introduced: v-

Description

Returns boolean based on if the vehicle has accessible trunk.

Syntax

IsTrunkVehicle(vehicleid)

Parameters

  • vehicleid
    The vehicle identifier.

Return Value

  • Returns true if vehicle's trunk is accesible.

Example Server

function IsTrunkVehicle(vehicleid)
	local modelid = GetVehicleModel(vehicleid)
	local array = {1, 2, 3, 4, 5, 7, 8, 11, 12, 19, 24, 25}

	for _, v in ipairs(array) do
		if modelid == v then
			return true
		end
	end
	return false
end

See also

__EDIT_ME__