Difference between revisions of "API GetAddonItemInfo"

From Vendetta Lua
Jump to: navigation, search
(split)
 
Line 1: Line 1:
=== GetAddonItemInfo ===
+
{{Function
'''Definition:'''<br>
+
| name        = GetAddonItemInfo
GetAddonItemInfo(int itemid) -> int current maximum
+
| desc        = Returns current and maximum ammo if itemid is a weapon with ammo, or current/maximum armor if itemid is a ship.
<br>
+
| arg1_name    = itemid
'''Description:'''<br>
+
| arg1_type    = number
Returns current and maximum ammo if itemid is a weapon with ammo, or current/maximum armor if itemid is a ship.
+
| arg1_desc    = itemid of an addon or ship.
<br>
+
| ret1_name    = current
'''Arguments:'''<br>
+
| ret1_type    = number
''itemid'' itemid of an addon or ship.
+
| ret1_desc    = Current ammo/armor, or -1.
<br>
+
| ret2_name    = maximum
'''Returns:'''<br>
+
| ret2_type    = number
''current'' Current ammo/armor, or -1.<br>
+
| ret2_desc    = Maximum ammo/armor, or -1.
''maximum'' Maximum ammo/armor, or -1.
+
| ret3_name    = name
<br>
+
| ret3_type    = string
 +
| ret3_desc    = Name of weapon addon
 +
| ret3_opt    = true
 +
| notes        =
 +
}}

Revision as of 07:06, 20 October 2011

GetAddonItemInfo

Definition

GetAddonItemInfo( number  itemid) ->  number  current,  number  maximum [,  string  name ]
Description

Returns current and maximum ammo if itemid is a weapon with ammo, or current/maximum armor if itemid is a ship.
Arguments

Type Name Description
number itemid itemid of an addon or ship.
Returns

Type Name Description
number current Current ammo/armor, or -1.
number maximum Maximum ammo/armor, or -1.
string name Name of weapon addon