squadParams: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
m (Some wiki formatting)
 
(8 intermediate revisions by 2 users not shown)
Line 10: Line 10:
|gr2= System
|gr2= System


|descr= Returns data about squad of given unit loaded from squad.xml as well as about unit itself.<br>
|descr= Returns data about squad of given unit loaded from [[squad.xml]] as well as the unit itself.
All items in returned array are [[String]].
{{Feature|informative|This command returns an empty array in single player.}}
{{Feature|Informative| Since Arma 2.05.147777 return array is extended to contain unique squad ID as well as Arma 3 units ID}}


|s1= '''squadParams''' unit
|s1= [[squadParams]] unit


|p1= unit: [[Object]]
|p1= unit: [[Object]]


|r1= [[Array]] - in format : <br>
|r1= [[Array]] in format [squadInfo, memberInfo, squadId, a3unitsId] where:
[
* squadInfo: [[Array]] of [[String]]s format [nick, name, email, web, picture, title]
:[nick, name, email, web, picture, title], {{cc| squad info}}
* memberInfo: [[Array]] of [[String]]s format [uid, name, fullname, email, icq, remark]
:[uid, name, fullname, email, icq, remark], {{cc| unit info}}
* {{GVI|arma3|2.06|size= 0.75}} squadId: [[String]] - unique squad ID
:squadId, {{cc| unique squad ID (Since Arma 2.05.147777)}}
* {{GVI|arma3|2.06|size= 0.75}} a3unitsId: [[String]] - unique {{arma3}} Units ID
:a3unitsId {{cc| unique Arma 3 Units ID (Since Arma 2.05.147777)}}
]


|x1= <code>_info = [[squadParams]] [[player]];</code>
|x1= <sqf>_info = squadParams player;</sqf>


|seealso= [[squad.xml]]
|x2= <sqf>squadParams player params ["_squadInfo", "_memberInfo", "_squadID", "_a3unitsID"];</sqf>
 
|seealso= [[squad.xml]]
}}
}}
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on July 19, 2015 - 21:43 (UTC)</dd>
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dd class="note">
Returns an empty array in singleplayer.
</dd>
</dl>

Latest revision as of 15:15, 21 November 2023

Hover & click on the images for description

Description

Description:
Returns data about squad of given unit loaded from squad.xml as well as the unit itself.
This command returns an empty array in single player.
Groups:
Object ManipulationSystem

Syntax

Syntax:
squadParams unit
Parameters:
unit: Object
Return Value:
Array in format [squadInfo, memberInfo, squadId, a3unitsId] where:
  • squadInfo: Array of Strings format [nick, name, email, web, picture, title]
  • memberInfo: Array of Strings format [uid, name, fullname, email, icq, remark]
  • Arma 3 logo black.png2.06 squadId: String - unique squad ID
  • Arma 3 logo black.png2.06 a3unitsId: String - unique Arma 3 Units ID

Examples

Example 1:
_info = squadParams player;
Example 2:
squadParams player params ["_squadInfo", "_memberInfo", "_squadID", "_a3unitsID"];

Additional Information

See also:
squad.xml

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note