IsHoodVehicle

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

Type: Lua Helper
Context: Server
Introduced: v-

Description

Returns boolean based on if the vehicle has accessible hood.

Syntax

IsHoodVehicle(vehicleid)

Parameters

  • vehicleid
    The vehicle identifier.

Return Value

  • Returns true if vehicle's hood is accesible.

Example Server

function IsHoodVehicle(vehicleid)

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

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

See also

__EDIT_ME__