IsVehicleHornActive: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|IsVehicleHornActive(vehicle)}} {{FuncParameters}} {{FuncParam|vehicle|__EDIT_ME__}} {{FuncReturnV...")
 
No edit summary
 
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Check if the vehicle horn is active or not.}}


{{FuncSyntax|IsVehicleHornActive(vehicle)}}
{{FuncSyntax|IsVehicleHornActive(vehicle)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|vehicle|__EDIT_ME__}}
{{FuncParam|vehicle|The vehicle identifier.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
local vehicleId = GetPlayerVehicle()
if IsVehicleHornActive(vehicleId) then
    AddPlayerChat("You are pressing the horn.")
end
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
__EDIT_ME__

Latest revision as of 09:44, 12 December 2019

IsVehicleHornActive

Type: Function
Context: Client
Introduced: v1.0

Description

Check if the vehicle horn is active or not.

Syntax

IsVehicleHornActive(vehicle)

Parameters

  • vehicle
    The vehicle identifier.

Return Value

  • Returns true on success.

Example

local vehicleId = GetPlayerVehicle()
if IsVehicleHornActive(vehicleId) then
    AddPlayerChat("You are pressing the horn.")
end

See also

__EDIT_ME__