Difference between revisions of "VN ms module fnc vehicleRespawn add"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Text replacement - "[[vn_" to "[[VN_")
(Page filling)
 
Line 1: Line 1:
[[Category:TODO]]
 
 
{{Function
 
{{Function
  
Line 6: Line 5:
 
|author= Wyqer, veteran29
 
|author= Wyqer, veteran29
  
|a=
+
|a= global
  
|e=
+
|e= global
 +
 
 +
|n= server
  
 
|g1= VehicleRespawn
 
|g1= VehicleRespawn
  
|d= <pre>/*
+
|d= Adds a vehicle to the VN Vehicle respawn system.
    Author: Wyqer, veteran29
+
 
    Date: 2019-06-21
+
|s= [vehicle, delay, outDistance, outTime, ifDisabled, notify, initCode, name] call [[VN_ms_module_fnc_vehicleRespawn_add]]
 +
 
 +
|p1n= vehicle
 +
|p1t= object
 +
|p1d= vehicle to respawn
 +
|p1v=
 +
 
 +
|p2n= delay
 +
|p2t= number
 +
|p2d= respawn delay, in seconds
 +
|p2v= 30
  
    Description:
+
|p3n= outDistance
        Adds vehicle to VN Vehicle respawn system.
+
|p3t= number
 +
|p3d= abandon distance
 +
|p3v= 1000
  
    Parameter(s):
+
|p4n= outTime
        _vehicle            - Vehicle to respawn                    [OBJECT, defaults to objNull]
+
|p4t= number
        _respawnDelay      - Respawn delay in seconds              [NUMBER, defaults to 30]
+
|p4d= abandon time, in seconds (0 = disabled)
        _abandonDistance    - Abandon distance                      [NUMBER, defaults to 1000]
+
|p4v= 0
        _adandonTime        - Abandon time in seconds (0 = disabled)[NUMBER, defaults to 0]
 
        _respawnImmobilized - Respawn when vehicle unable to move  [BOOL, defaults to true]
 
        _notification      - Notifiy player about respawn          [BOOL, defaults to true]
 
        _initCode          - Code to be executed upon respawn (args: <old>, <new>) [CODE, defaults to {}]
 
        _name              - Name used in respawn notification    [STRING, defaults to ""]
 
  
    Returns:
+
|p5n= ifDisabled
        Vehicle was added to respawn system [BOOL]
+
|p5t= boolean
*/
+
|p5d= respawn when vehicle is unable to move
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
+
|p5v= true
  
|s= [] call [[VN_ms_module_fnc_vehicleRespawn_add]]
+
|p6n= notify
 +
|p6t= boolean
 +
|p6d= notify player of the vehicle's respawn
 +
|p6v=
  
|p1n=
+
|p7n= initCode
|p1t=
+
|p7t= code
|p1d=
+
|p7d= code to be executed upon respawn. Arguments: <code>params ["_oldVehicle", "_newVehicle"];</code>
|p1v=
+
|p7v= {}
  
|p2n=
+
|p8n= name
|p2t=
+
|p8t= string
|p2d=
+
|p8d= name used in respawn notification
|p2v=
+
|p8v= ""
  
|r1t=
+
|r1t= boolean
|r1d=
+
|r1d= function's success
  
|x1= <code>-</code>
+
|x1= <code>[sogJeep, 10, 500, 300, true, true, {}, "The Great&trade; Jeep"] call [[VN_ms_module_fnc_vehicleRespawn_add]];</code>
 
}}
 
}}

Latest revision as of 18:22, 26 February 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): global
Effect(s): global
Execution: Server only

Description

Adds a vehicle to the VN Vehicle respawn system.

Syntax

Syntax
[vehicle, delay, outDistance, outTime, ifDisabled, notify, initCode, name] call VN_ms_module_fnc_vehicleRespawn_add
Parameters
vehicle: Object - vehicle to respawn
delay: Number - (Optional, default 30) respawn delay, in seconds
outDistance: Number - (Optional, default 1000) abandon distance
outTime: Number - (Optional, default 0) abandon time, in seconds (0 = disabled)
ifDisabled: Boolean - (Optional, default true) respawn when vehicle is unable to move
notify: Boolean - notify player of the vehicle's respawn
initCode: Code - (Optional, default {}) code to be executed upon respawn. Arguments: params ["_oldVehicle", "_newVehicle"];
name: String - (Optional, default "") name used in respawn notification
Return value
Boolean - function's success

Examples

Example 1
[sogJeep, 10, 500, 300, true, true, {}, "The Great™ Jeep"] call VN_ms_module_fnc_vehicleRespawn_add;