Touche windows


#1

Bonjour j’ai un probleme je me suis apercu que la touche windows ne fontionnais pas sur mon serveur donc on ne peut pas reparer les vehicule est ce que quelqu’un pourrais m’aider ? Merci


#2

Lordox_ Ton menu Y marche ou pas ?


#3

Oui


#4

justement je regardais le keyHandler , et j’ai sa pour la touche windows

//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)  

case _interactionKey:  

{  

    if(_restrained) exitWith  

    {  

        _handled = true;  

        _handled;  

    };

#5

Envoie ton core > functions > fn_keyhandler.sqf

Merci le probleme vien de là


#6

Lordox_ Ce n’est pas sa le probleme il y a une chose qui fait bug tous le fichier…


#7

Voici


#8
/*  
	File: fn_keyHandler.sqf  
	Author: Bryan "Tonic" Boardwine  

	Description:  
	Main key handler for event 'keyDown'  
*/  
private ["_handled","_shift","_alt","_code","_ctrl","_alt","_ctrlKey","_veh","_locked"];  
_ctrl = _this select 0;  
_code = _this select 1;  
_shift = _this select 2;  
_ctrlKey = _this select 3;  
_alt = _this select 4;  
_speed = speed cursorTarget;  
_handled = false;  

//hint str _code;  
if(life_action_inUse) exitWith {_handled};  

switch (_code) do  
{  
	//Restraining (Shift + R)  
	case 19:  
	{  
		if(_shift) then {_handled = true;};  
		if(_shift && playerSide == west && !isNull cursorTarget && cursorTarget isKindOf "Man" && (isPlayer cursorTarget) && (side cursorTarget == civilian) && alive cursorTarget && cursorTarget distance player < 3.5 && !(cursorTarget getVariable "Escorting") && !(cursorTarget getVariable "restrained") && speed cursorTarget < 1) then  
		{  
			[] call life_fnc_restrainAction;  
		};  
	};  

	//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)  
	case _interactionKey:  
	{  
		if(_restrained) exitWith  
		{  
			_handled = true;  
			_handled;  
		};  

		if(!life_action_inUse) then {  
			[] spawn   
			{  
				private["_handle"];  
				_handle = [] spawn life_fnc_actionKeyHandler;  
				waitUntil {scriptDone _handle};  
				life_action_inUse = false;  
			};  
		};  
	};  

	//Knock out, this is experimental and yeah…  
	case 34:  
	{  
		if(_shift) then {_handled = true;};  
		if(_shift && playerSide == civilian && !isNull cursorTarget && cursorTarget isKindOf "Man" && isPlayer cursorTarget && alive cursorTarget && cursorTarget distance player < 4 && speed cursorTarget < 1) then  
		{  
			if((animationState cursorTarget) != "Incapacitated" && (currentWeapon player == primaryWeapon player OR currentWeapon player == handgunWeapon player) && currentWeapon player != "" && !life_knockout && !(player getVariable["restrained",false]) && !life_istazed) then  
			{  
				[cursorTarget] spawn life_fnc_knockoutAction;  
			};  
		};  
	};  

	//L Key?  
	case 38:   
	{  
		//If cop run checks for turning lights on.  
		if(_shift && playerSide == west) then   
		{  
			if(vehicle player != player && (typeOf vehicle player) in ["C_Offroad_01_F","B_MRAP_01_gmg_F","C_Hatchback_01_sport_F","C_Hatchback_01_F","B_MRAP_01_F","C_SUV_01_F","B_Heli_Light_01_F","I_Heli_light_03_unarmed_F","B_Heli_Transport_01_camo_F","B_Heli_Attack_01_F"]) then   
			{  
				if(!isNil {vehicle player getVariable "lights"}) then   
				{  
					[vehicle player] call life_fnc_sirenLights;  
					_handled = true;  
				};  
			};  
		};  

		if(!_alt && !_ctrlKey) then { [] call life_fnc_radar; };  
	};  

	//T Key (Trunk)  
	case 20:  
	{  
		if(!_alt && !_ctrlKey) then  
		{  
			if(vehicle player != player && alive vehicle player) then  
			{  
				if((vehicle player) in life_vehicles) then  
				{  
					[vehicle player] call life_fnc_openInventory;  
				};  
			}  
				else  
			{  
				if((cursorTarget isKindOf "Car" OR cursorTarget isKindOf "Air" OR cursorTarget isKindOf "Ship") && player distance cursorTarget < 7 && vehicle player == player && alive cursorTarget) then  
				{  
					if(cursorTarget in life_vehicles) then  
					{  
						[cursorTarget] call life_fnc_openInventory;  
					};  
				};  
			};  
		};  
	};  

	//L Key?  
	case 38: { if(!_alt && !_ctrlKey) then { [] call life_fnc_radar; };};  

	//Y Player Menu  
	case 21:  
	{  
		if(!_alt && !_ctrlKey && !dialog) then  
		{  
			[] call life_fnc_p_openMenu;  
		};  
	};  

	//F Key  
	case 33:  
	{  
		if(playerSide == west && vehicle player != player && !life_siren_active && ((driver vehicle player) == player)) then  
		{  
			[] spawn  
			{  
				life_siren_active = true;  
				sleep 4.7;  
				life_siren_active = false;  
			};  
			_veh = vehicle player;  
			if(isNil {_veh getVariable "siren"}) then {_veh setVariable["siren",false,true];};  
			if((_veh getVariable "siren")) then  
			{  
				titleText ["Sirènes Off","PLAIN"];  
				_veh setVariable["siren",false,true];  
			}  
				else  
			{  
				titleText ["Sirènes On","PLAIN"];  
				_veh setVariable["siren",true,true];  
				[[_veh],"life_fnc_copSiren",nil,true] spawn life_fnc_MP;  
			};  
		};  
	};  

	//U Key  
	case 22:  
	{  
		if(!_alt && !_ctrlKey) then  
		{  
			if(vehicle player == player) then  
			{  
				_veh = cursorTarget;  
			}  
				else  
			{  
				_veh = vehicle player;  
			};  

			_locked = locked _veh;  

			if(_veh in life_vehicles && player distance _veh < 8) then  
			{  
				if(_locked == 2) then  
				{  
					if(local _veh) then  
					{  
						_veh lock 0;  
					}  
						else  
					{  
						[[_veh,0], "life_fnc_lockVehicle",_veh,false] spawn life_fnc_MP;  
					};  
					hint composeText [ image "icons\unlock.paa", "  Vous avez dévérouillé votre véhicule" ];  
					[player,"Car_Unlock"] call life_fnc_globalSound;  
				}  
					else  
				{  
					if(local _veh) then  
					{  
						_veh lock 2;  
					}  
						else  
					{  
						[[_veh,2], "life_fnc_lockVehicle",_veh,false] spawn life_fnc_MP;  
					};  

					hint composeText [ image "icons\lock.paa", "  Vous avez vérouillé votre véhicule" ];  
					[player,"Car_Lock"] call life_fnc_globalSound;  
				};  
			};  
		};  
	};  
};  

_handled;  

Copie dans ton fn_keyHandler.sqf


#9

je test et je te dit


#10

Lordox_ Ok


#11

Le serv ne demare meme plus ….


#12

Remplace :

//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)  
case _interactionKey:  
{  
if(_restrained) exitWith  
{  
_handled = true;  
_handled;  
};  

if(!life_action_inUse) then {  
[] spawn   
{  
private["_handle"];  
_handle = [] spawn life_fnc_actionKeyHandler;  
waitUntil {scriptDone _handle};  
life_action_inUse = false;  
};  
};  
};```

**PAR :**

//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)
case _interactionKey:
{
if(!life_action_inUse) then {
[] spawn
{
private["_handle"];
_handle = [] spawn life_fnc_actionKeyHandler;
waitUntil {scriptDone _handle};
life_action_inUse = false;
};
};
};```


#13

Non c’est bon il démare mais ca ne vas toujours pas


#14

Lordox_ Ok Attend


#15
/*  
	File: fn_keyHandler.sqf  
	Author: Bryan "Tonic" Boardwine  

	Description:  
	Main key handler for event 'keyDown'  
*/  
private ["_handled","_shift","_alt","_code","_ctrl","_alt","_ctrlKey","_veh","_locked","_interactionKey","_mapKey","_interruptionKeys","_player"];  
_ctrl = _this select 0;  
_code = _this select 1;  
_shift = _this select 2;  
_ctrlKey = _this select 3;  
_alt = _this select 4;  
_player = player;  
_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  

//Vault handling…  
if((_code in (actionKeys "GetOver") || _code in (actionKeys "salute")) && {(player getVariable ["restrained",false])}) exitWith {  
	true;  
};  

if(life_action_inUse) exitWith {  
	if(!life_interrupted && _code in _interruptionKeys) then {life_interrupted = true;};  
	_handled;  
};  

switch (_code) do  
{  
	//Space key for Jumping  
	case 57:  
	{  
		if(isNil "jumpActionTime") then {jumpActionTime = 0;};  
		if(_shift && {animationState player != "AovrPercMrunSrasWrflDf"} && {isTouchingGround player} && {stance player == "STAND"} && {speed player > 2} && {!life_is_arrested} && {(velocity player) select 2 < 2.5} && {time - jumpActionTime > 1.5}) then {  
			jumpActionTime = time; //Update the time.  
			[player,true] spawn life_fnc_jumpFnc; //Local execution  
			[[player,false],"life_fnc_jumpFnc",nil,FALSE] call life_fnc_MP; //Global execution   
			_handled = true;  
		};  
	};  

	//Map Key  
	case _mapKey:  
	{  
		switch (playerSide) do   
		{  
			case west: {if(!visibleMap) then {[] spawn life_fnc_copMarkers;}};  
			case independent: {if(!visibleMap) then {[] spawn life_fnc_medicMarkers;}};  
		};  
	};  

	//Holster / recall weapon.  
	case 35:  
	{  
		if(_shift && !_ctrlKey && currentWeapon player != "") then {  
			life_curWep_h = currentWeapon player;  
			player action ["SwitchWeapon", player, player, 100];  
			player switchcamera cameraView;  
		};  

		if(!_shift && _ctrlKey && !isNil "life_curWep_h" && {(life_curWep_h != "")}) then {  
			if(life_curWep_h in [primaryWeapon player,secondaryWeapon player,handgunWeapon player]) then {  
				player selectWeapon life_curWep_h;  
			};  
		};  
	};  

	//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)  
	case _interactionKey:  
	{  
		if(!life_action_inUse) then {  
			[] spawn   
			{  
				private["_handle"];  
				_handle = [] spawn life_fnc_actionKeyHandler;  
				waitUntil {scriptDone _handle};  
				life_action_inUse = false;  
			};  
		};  
	};  

	//Restraining (Shift + R)  
	case 19:  
	{  
		if(_shift) then {_handled = true;};  
		if(_shift && playerSide == west && !isNull cursorTarget && cursorTarget isKindOf "Man" && (isPlayer cursorTarget) && (side cursorTarget in [civilian,independent]) && alive cursorTarget && cursorTarget distance player < 3.5 && !(cursorTarget getVariable "Escorting") && !(cursorTarget getVariable "restrained") && speed cursorTarget < 1) then  
		{  
			[] call life_fnc_restrainAction;  
		};  
	};  

	//Knock out, this is experimental and yeah...  
	case 34:  
	{  
		if(_shift) then {_handled = true;};  
		if(_shift && playerSide == civilian && !isNull cursorTarget && cursorTarget isKindOf "Man" && isPlayer cursorTarget && alive cursorTarget && cursorTarget distance player < 4 && speed cursorTarget < 1) then  
		{  
			if((animationState cursorTarget) != "Incapacitated" && (currentWeapon player == primaryWeapon player OR currentWeapon player == handgunWeapon player) && currentWeapon player != "" && !life_knockout && !(player getVariable["restrained",false]) && !life_istazed) then  
			{  
				[cursorTarget] spawn life_fnc_knockoutAction;  
			};  
		};  
	};  

	//T Key (Trunk)  
	case 20:  
	{  
		if(!_alt && !_ctrlKey) then  
		{  
			if(vehicle player != player && alive vehicle player) then  
			{  
				if((vehicle player) in life_vehicles) then  
				{  
					[vehicle player] call life_fnc_openInventory;  
				};  
			}  
				else  
			{  
				if((cursorTarget isKindOf "Car" OR cursorTarget isKindOf "Air" OR cursorTarget isKindOf "Ship" OR cursorTarget isKindOf "House_F") && player distance cursorTarget < 7 && vehicle player == player && alive cursorTarget) then  
				{  
					if(cursorTarget in life_vehicles OR {!(cursorTarget getVariable ["locked",true])}) then  
					{  
						[cursorTarget] call life_fnc_openInventory;  
					};  
				};  
			};  
		};  
	};  
	//L Key?  
	case 38:   
	{  
		//If cop run checks for turning lights on.  
		if(_shift && playerSide in [west,independent]) then {  
			if(vehicle player != player && (typeOf vehicle player) in ["C_Offroad_01_F","B_MRAP_01_F","C_SUV_01_F"]) then {  
				if(!isNil {vehicle player getVariable "lights"}) then {  
					if(playerSide == west) then {  
						[vehicle player] call life_fnc_sirenLights;  
					} else {  
						[vehicle player] call life_fnc_medicSirenLights;  
					};  
					_handled = true;  
				};  
			};  
		};  

		if(!_alt && !_ctrlKey) then { [] call life_fnc_radar; };  
	};  
	//Y Player Menu  
	case 21:  
	{  
		if(!_alt && !_ctrlKey && !dialog) then  
		{  
			[] call life_fnc_p_openMenu;  
		};  
	};  

	//F Key  
	case 33:  
	{  
		if(playerSide in [west,independent] && vehicle player != player && !life_siren_active && ((driver vehicle player) == player)) then  
		{  
			[] spawn  
			{  
				life_siren_active = true;  
				sleep 4.7;  
				life_siren_active = false;  
			};  
			_veh = vehicle player;  
			if(isNil {_veh getVariable "siren"}) then {_veh setVariable["siren",false,true];};  
			if((_veh getVariable "siren")) then  
			{  
				titleText [localize "STR_MISC_SirensOFF","PLAIN"];  
				_veh setVariable["siren",false,true];  
			}  
				else  
			{  
				titleText [localize "STR_MISC_SirensON","PLAIN"];  
				_veh setVariable["siren",true,true];  
				if(playerSide == west) then {  
					[[_veh],"life_fnc_copSiren",nil,true] spawn life_fnc_MP;  
				} else {  
					//I do not have a custom sound for this and I really don't want to go digging for one, when you have a sound uncomment this and change medicSiren.sqf in the medical folder.  
					//[[_veh],"life_fnc_medicSiren",nil,true] spawn life_fnc_MP;  
				};  
			};  
		};  
	};  
	//U Key  
	case 22:  
	{  
		if(!_alt && !_ctrlKey) then {  
			if(vehicle player == player) then {  
				_veh = cursorTarget;  
			} else {  
				_veh = vehicle player;  
			};  

			if(_veh isKindOf "House_F" && playerSide == civilian) then {  
				if(_veh in life_vehicles && player distance _veh < 8) then {  
					_door = [_veh] call life_fnc_nearestDoor;  
					if(_door == 0) exitWith {hint localize "STR_House_Door_NotNear"};  
					_locked = _veh getVariable [format["bis_disabled_Door_%1",_door],0];  
					if(_locked == 0) then {  
						_veh setVariable[format["bis_disabled_Door_%1",_door],1,true];  
						_veh animate [format["door_%1_rot",_door],0];  
						systemChat localize "STR_House_Door_Lock";  
					} else {  
						_veh setVariable[format["bis_disabled_Door_%1",_door],0,true];  
						_veh animate [format["door_%1_rot",_door],1];  
						systemChat localize "STR_House_Door_Unlock";  
					};  
				};  
			} else {  
				_locked = locked _veh;  
				if(_veh in life_vehicles && player distance _veh < 8) then {  
					if(_locked == 2) then {  
						if(local _veh) then {  
							_veh lock 0;  
						} else {  
							[[_veh,0],"life_fnc_lockVehicle",_veh,false] spawn life_fnc_MP;  
						};  
						systemChat localize "STR_MISC_VehUnlock";  
						player say3D "car_lock";  
					} else {  
						if(local _veh) then {  
							_veh lock 2;  
						} else {  
							[[_veh,2],"life_fnc_lockVehicle",_veh,false] spawn life_fnc_MP;  
						};	  
						systemChat localize "STR_MISC_VehLock";  
						player say3D "unlock";  

	  case 62:  
    {  
    if(_alt && !_shift) then {  
    diag_log format ["SERVER DIZ: %1 usando ALT+F4 para se desconectar (reporte aos Administradores)",_player getVariable["realname",name _player]];  
    [[1,format["SERVER DIZ: %1 usando ALT+F4 para se desconectar (reporte aos Administradores)",_player getVariable["realname",name _player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;  
    };  
    };  
    case 211:  
    {  
    if(_ctrlKey && _alt)  then {  
    diag_log format ["SERVER DIZ: %1 usando CTRL + ALT + DEL provavel disconnect (reporte aos Administradores)",_player getVariable["realname",name _player]];  
    [[1,format["SERVER DIZ: %1 usando CTRL + ALT + DEL  provavel disconnect (reporte aos Administradores)",_player getVariable["realname",name _player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;  
    };  
    };  
    case 15:  
    {  
    if( _alt)  then {  
    diag_log format ["SERVER DIZ: %1 usando ALT + TAB  provavel disconnect (reporte aos Administradores)",_player getVariable["realname",name _player]];  
    [[1,format["SERVER DIZ: %1 usando ALT + TAB  provavel disconnect (reporte aos Administradores)",_player getVariable["realname",name _player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;  
    };  
    };  
    case 1:  
    {  
    if( _ctrlKey )  then {  
    diag_log format ["SERVER DIZ: %1 usando CTRL + ESC provavel disconnect (reporte aos Administradores)",_player getVariable["realname",name _player]];  
    [[1,format["SERVER DIZ: %1 usando CTRL + ESC provavel disconnect (reporte aos Administradores)",_player getVariable["realname",name _player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;  
    };  
    };					  
					};  
				};  
			};  
		};  
	};  
};  

_handled;  

Marche tres bien celui là


#16

Super ca marche merci bcp


#17

Lordox_ De rien