Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;; http://lex-ofp.narod.ru Lex-OFP@yandex.ru ICQ 471230703
- ;;; v1.1
- ?(isNull player): Exit
- _Unit=_this select 0
- _Reload=0
- #Reload
- ;;; =====================================================Horn
- _Horn = call loadFile format[":file read BT_DeLorean.db %1", "Horn"]
- ?(format["%1",_Horn]=="-1"): _Horn=["SHIFT","LBUTTON"]
- _Horn_count=(count _Horn)
- ?(_Horn_count<1) or (_Horn_count>3): _Horn=["SHIFT","LBUTTON"]; _Horn_count=2
- _Horn1=_Horn select 0;_Horn2="null";_Horn3="null"
- ?(_Horn_count>1):_Horn2=_Horn select 1
- ?(_Horn_count>2):_Horn3=_Horn select 2
- ;;; =====================================================Reset
- _Reset= call loadFile format[":file read BT_DeLorean.db %1", "Reset"]
- ?(format["%1",_Reset]=="-1"): _Reset=["SHIFT","LBUTTON","RBUTTON"]
- _Reset_count=(count _Reset)
- ?(_Reset_count<1) or (_Reset_count>3): _Reset=["SHIFT","LBUTTON","RBUTTON"]; _Reset_count=3
- _Reset1=_Reset select 0;_Reset2="null";_Reset3="null"
- ?(_Reset_count>1):_Reset2=_Reset select 1
- ?(_Reset_count>2):_Reset3=_Reset select 2
- ;;; =====================================================off
- _off= call loadFile format[":file read BT_DeLorean.db %1", "off"]
- ?(format["%1",_off]=="-1"): _off=["CTRL","LBUTTON","RBUTTON"]
- _off_count=(count _off)
- ?(_off_count<1) or (_off_count>3): _off=["CTRL","LBUTTON","RBUTTON"]; _off_count=3
- _off1=_off select 0;_off2="null";_off3="null"
- ?(_off_count>1):_off2=_off select 1
- ?(_off_count>2):_off3=_off select 2
- ;;; =====================================================Left
- _Left= call loadFile format[":file read BT_DeLorean.db %1", "Left"]
- ?(format["%1",_Left]=="-1"): _Left=["CTRL","LBUTTON"]
- _Left_count=(count _Left)
- ?(_Left_count<1) or (_Left_count>3): _Left=["CTRL","LBUTTON"]; _Left_count=2
- _Left1=_Left select 0;_Left2="null";_Left3="null"
- ?(_Left_count>1):_Left2=_Left select 1
- ?(_Left_count>2):_Left3=_Left select 2
- ;;; =====================================================Right
- _Right= call loadFile format[":file read BT_DeLorean.db %1", "Right"]
- ?(format["%1",_Right]=="-1"): _Right=["CTRL","RBUTTON"]
- _Right_count=(count _Right)
- ?(_Right_count<1) or (_Right_count>3): _Right=["CTRL","RBUTTON"]; _Right_count=2
- _Right1=_Right select 0;_Right2="null";_Right3="null"
- ?(_Right_count>1):_Right2=_Right select 1
- ?(_Right_count>2):_Right3=_Right select 2
- ;;; =====================================================
- ?(_Reload>0): hint format["Fwatch v%1 DeLorean\n\n%2\n%3\n\n%4\n%5\n\n%6\n%7\n\n%8\n%9\n\n%10\n%11",loadFile ":info version",localize "STR_BT_DeLorean_Horn",_Horn,localize "STR_BT_DeLorean_Reset",_Reset,localize "STR_BT_DeLorean_Off_Povorotnik",_off,localize "STR_BT_DeLorean_L_Povorotnik",_Left,localize "STR_BT_DeLorean_R_Povorotnik",_Right]; goto "Help"
- ;;; =====================================================Loop
- _Status=0
- ; number is the sleep time
- 0.05 exec "..\fwatch\data\InputMulti.sqs"
- @Format ["%1",count FWATCH_INPUT_MULTI] != "scalar"
- #Loop
- @(driver _Unit== player) or !(alive _Unit)
- ?!(alive _Unit): Exit
- ; input multi returns "LSHIFT" and "RSHIFT" instead of "SHIFT", too keep compatibility use this:
- _keys =+ FWATCH_INPUT_MULTI select 0
- ? "LSHIFT" in _keys || "RSHIFT" in _keys : _keys=_keys-["LSHIFT","RSHIFT"]; _keys=_keys+["SHIFT"]
- ? "LALT" in _keys || "RALT" in _keys : _keys=_keys-["LALT","RALT"]; _keys=_keys+["ALT"]
- ? "LCTRL" in _keys || "RCTRL" in _keys : _keys=_keys-["LCTRL","RCTRL"]; _keys=_keys+["CTRL"]
- ;;; =====================================================Help
- ?( "F1" in _keys) and ( "LBUTTON" in _keys): _Reload=1;goto "Reload"
- ;;; =====================================================Reset
- ?(_Reset_count==1) and (_Reset1 in _keys): goto "Reset"
- ?(_Reset_count==2) and (_Reset1 in _keys) and (_Reset2 in _keys): goto "Reset"
- ?(_Reset_count==3) and (_Reset1 in _keys) and (_Reset2 in _keys) and (_Reset3 in _keys): goto "Reset"
- ;;; =====================================================Horn
- ?(_Horn_count==1) and (_Horn1 in _keys): goto "Horn"
- ?(_Horn_count==2) and (_Horn1 in _keys) and (_Horn2 in _keys): goto "Horn"
- ?(_Horn_count==3) and (_Horn1 in _keys) and (_Horn2 in _keys) and (_Horn3 in _keys): goto "Horn"
- ;;; =====================================================off
- ?(_off_count==1) and (_off1 in _keys): goto "off"
- ?(_off_count==2) and (_off1 in _keys) and (_off2 in _keys): goto "off"
- ?(_off_count==3) and (_off1 in _keys) and (_off2 in _keys) and (_off3 in _keys): goto "off"
- ;;; =====================================================L_R
- ?(_Left_count==1) and (_Left1 in _keys) and (_Status==2): goto "off"
- ?(_Left_count==2) and (_Left1 in _keys) and (_Left2 in _keys) and (_Status==2): goto "off"
- ?(_Left_count==3) and (_Left1 in _keys) and (_Left2 in _keys) and (_Left3 in _keys) and (_Status==2): goto "off"
- ;;; ===========================
- ?(_Right_count==1) and (_Right1 in _keys) and (_Status==1): goto "off"
- ?(_Right_count==2) and (_Right1 in _keys) and (_Right2 in _keys) and (_Status==1): goto "off"
- ?(_Right_count==3) and (_Right1 in _keys) and (_Right2 in _keys) and (_Right3 in _keys) and (_Status==1): goto "off"
- ;;; =====================================================Left
- ?(_Left_count==1) and (_Left1 in _keys) and (_Status==0): [_Unit,"L"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=1
- ?(_Left_count==2) and (_Left1 in _keys) and (_Left2 in _keys) and (_Status==0): [_Unit,"L"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=1
- ?(_Left_count==3) and (_Left1 in _keys) and (_Left2 in _keys) and (_Left3 in _keys) and (_Status==0): [_Unit,"L"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=1
- ;;; =====================================================Right
- ?(_Right_count==1) and (_Right1 in _keys) and (_Status==0): [_Unit,"R"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=2
- ?(_Right_count==2) and (_Right1 in _keys) and (_Right2 in _keys) and (_Status==0): [_Unit,"R"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=2
- ?(_Right_count==3) and (_Right1 in _keys) and (_Right2 in _keys) and (_Right3 in _keys) and (_Status==0): [_Unit,"R"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=2
- ;;; =====================================================Sleep
- #Sleep
- ~0.1
- goto "Loop"
- ;;; =====================================================Help
- #Help
- _Reload=0
- ~2
- goto "Loop"
- ;;; =====================================================Horn
- #Horn
- _Unit animate ["Trg_Horn", 1]
- ~2
- goto "Loop"
- ;;; =====================================================Reset
- #Reset
- _Unit animate ["Triger_Reset",1]
- _Unit AddWeapon "BT_DeLorean_TRG_Reset"
- TRG_Addon_BT_DeLorean_Unit_R=_Unit
- publicVariable"TRG_Addon_BT_DeLorean_Unit_R"
- ~2
- goto "Loop"
- ;;; =====================================================off
- #off
- _Status=0
- [_Unit,"Off"] exec "\BT_DeLorean\Script\Povorotnik.sqs"
- ~1
- goto "Loop"
- ;;; =====================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement