SetVehicleRespawnParams: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetVehicleRespawnParams(vehicle, EnableRespawn [, RespawnTime, RepairOnRespawn])}} {{FuncParameter..."
 
28days (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Set the per-vehicle respawn parameters.}}


{{FuncSyntax|SetVehicleRespawnParams(vehicle, EnableRespawn [, RespawnTime, RepairOnRespawn])}}
{{FuncSyntax|SetVehicleRespawnParams(vehicle, EnableRespawn [, RespawnTime, RepairOnRespawn])}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|vehicle|__EDIT_ME__}}
{{FuncParam|vehicle|The vehicle identifier.}}
{{FuncParam|EnableRespawn |__EDIT_ME__}}
{{FuncParam|EnableRespawn |The respawn toggle boolean.}}
{{FuncParam|RespawnTime|__EDIT_ME__}}
{{FuncParam|RespawnTime|The respawn time in milliseconds.}}
{{FuncParamOptional|RepairOnRespawn|__EDIT_ME__}}
{{FuncParamOptional|RepairOnRespawn|Repair on respawn boolean.}}


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


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
local vehicle = CreateVehicle(2, 0.0, 0.0, 1600.0, 90.0)
SetVehicleRespawnParams(vehicle, false, 0, false)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:VehicleFunctions}}

Latest revision as of 16:14, 16 February 2020

SetVehicleRespawnParams

Type: Function
Context: Server
Introduced: v1.0

Description

Set the per-vehicle respawn parameters.

Syntax

SetVehicleRespawnParams(vehicle, EnableRespawn [, RespawnTime, RepairOnRespawn])

Parameters

  • vehicle
    The vehicle identifier.
  • EnableRespawn
    The respawn toggle boolean.
  • RespawnTime
    The respawn time in milliseconds.
  • RepairOnRespawn (optional)
    Repair on respawn boolean.

Return Value

  • Returns true on success.

Example

local vehicle = CreateVehicle(2, 0.0, 0.0, 1600.0, 90.0)
SetVehicleRespawnParams(vehicle, false, 0, false)

See also