Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Aroun MCF
- init.sqf
- */
- private ["_script","_key"];
- Mcf_One_Touche = 0;
- _ctrl = _this select 0;
- _key = _this select 1;
- _shift = _this select 2;
- _ctrlKey = _this select 3;
- _alt = _this select 4;
- _speed = speed cursorTarget;
- _handled = false;
- _interactionKey = if(count (actionKeys "User10") == 0) then {219} else {(actionKeys "User10") select 0};
- _mapKey = actionKeys "ShowMap" select 0;
- //hint str _code;
- _interruptionKeys = [17,30,31,32]; //A,S,W,D
- []spawn
- {
- _pause = time + 1;
- waitUntil {time >= _pause};
- };
- //Vault handling...
- if((_code in (actionKeys "GetOver") || _code in (actionKeys "salute")) && {(player getVariable ["restrained",false])}) exitWith {
- true;
- };
- if (isNil "MCF_Action_ON") then {MCF_Action_ON = false;};
- if (isNil "MCF_Stop_Action") then {MCF_Stop_Action = false;};
- if(MCF_Action_ON) exitWith {
- if(!MCF_Stop_Action && _code in _interruptionKeys) then {MCF_Stop_Action = true;};
- _handled;
- };
- //Hotfix for Interaction key not being able to be bound on some operation systems.
- if(count (actionKeys "User10") != 0 && {(inputAction "User10" > 0)}) exitWith {
- //Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)
- /*
- if(!MCF_Action_ON) then {
- [] spawn
- {
- private["_handle"];
- _handle = [] spawn life_fnc_actionKeyHandler;
- waitUntil {scriptDone _handle};
- MCF_Action_ON = false;
- };
- };
- */
- true;
- };
- switch (_key) do
- {
- case 57: {
- if(isNil "jumpActionTime") then {jumpActionTime = 0;};
- if(_shift && {animationState player != "AovrPercMrunSrasWrflDf"} && {isTouchingGround player} && {stance player == "STAND"} && {speed player > 2} && {(velocity player) select 2 < 2.5} && {time - jumpActionTime > 1.5}) then {
- jumpActionTime = time; //Update the time.
- [player,true] spawn MCF_fnc_jumpFnc; //Local execution
- // [player,false] remoteExec ["life_fnc_jumpFnc",0]; //Global execution
- _handled = true;
- };
- };
- case 59: {
- if(_shift) then {
- []spawn {
- if (soundVolume != 1 ) then [{
- 1 fadeSound 1;
- systemChat "Info partie : Audio 100%";
- sleep 1.5;
- },{
- 1 fadeSound 0.1;
- systemChat "Info partie : Audio 10%";
- }];
- };
- };
- };
- };
- _handled
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement