ScriptCore3.menu2weap

From Soldat Community Wiki
Revision as of 18:05, 1 May 2018 by Morko (talk | contribs)
Jump to: navigation, search
function menu2weap(Style: Byte): Byte
 Style: Position(Style) of the weapon in the Weapons List
 Result: Position(Style) of the weapon in the TWeapon.WType

Description

Translates the position of the weapon in the Weapon Menu (Weapons List) to the corresponding position of WType property of a Weapon Object - weapon in player's hands (TWeapon.WType).

Examples

begin
    WriteLn('menu2weap: '+inttostr(menu2obj(1))); //1
    WriteLn('menu2weap: '+inttostr(menu2obj(14))); //13
end.