Difference between revisions of "API ConfigureWeaponGroup"

From Vendetta Lua
Jump to: navigation, search
(split)
 
 
Line 1: Line 1:
=== ConfigureWeaponGroup ===
+
{{Function
'''Definition:'''<br>
+
| name        = ConfigureWeaponGroup
ConfigureWeaponGroup(int id, table port_ids, function cb) -> nil
+
| desc        = Configures one weapon group
<br>
+
| arg1_name    = id
'''Description:'''<br>
+
| arg1_type    = number
Configures one weapon group
+
| arg1_desc    = number of group. 0-5 primary, 6-11 secondary and 12-17 tertiary trigger
<br>
+
| arg1_opt    =
'''Arguments:'''<br>
+
| arg2_name    = port_ids
''id'' is number of group. 0-5 primary, 6-11 secondary and 12-17 tertiary trigger<br>
+
| arg2_type    = table
''ports_ids'' is list of ports active for that group (2-numweaponports)<br>
+
| arg2_desc    = list of ports active for that group (2-numweaponports)
''cb'' function to call on completition (optional)
+
| arg2_opt    =
<br>
+
| arg3_name    = cb
'''Example:'''<br>
+
| arg3_type    = function
 +
| arg3_desc    = function to call on completion
 +
| arg3_opt    = true
 +
| ret1_type    = nil
 +
| notes        = '''Example:'''<br>
 
<source lang=lua>
 
<source lang=lua>
 
-- enable port 1 and 2 for the primary trigger
 
-- enable port 1 and 2 for the primary trigger
 
ConfigureWeaponGroup(0, {2,3})
 
ConfigureWeaponGroup(0, {2,3})
 
</source>
 
</source>
 +
}}

Latest revision as of 03:49, 19 October 2011

ConfigureWeaponGroup

Definition

ConfigureWeaponGroup( number  id,  table  port_ids [,  function  cb ]) ->  nil
Description

Configures one weapon group
Arguments

Type Name Description
number id number of group. 0-5 primary, 6-11 secondary and 12-17 tertiary trigger
table port_ids list of ports active for that group (2-numweaponports)
function cb function to call on completion (optional)
Returns

Type Name Description
nil
Notes

Example:

-- enable port 1 and 2 for the primary trigger
ConfigureWeaponGroup(0, {2,3})