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| | {{FuncDescription|Check if the vehicle horn is active or not.}} | ||
{{FuncSyntax|IsVehicleHornActive(vehicle)}} | {{FuncSyntax|IsVehicleHornActive(vehicle)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|vehicle| | {{FuncParam|vehicle|The vehicle identifier.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns '''true''' on success.}} | ||
== Example == | == Example == | ||
<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
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__