Новости

SMF - Just Installed!

[Скрипт] Блокирование нажатия запрещенных клавиш

ReloadeD · 1598

ReloadeD

  • Administrator
  • Новенький
  • *****
    • Сообщений: 17
    • Рейтинг: 15
    • Просмотр профиля
dayz_spaceInterrupt.sqf
// вставить в самом низу над _handled
if (_dikCode == 0x53) then {
_nil = ["Decimal"] execVM "fixes\keys.sqf";
_handled = true;
};

if (_dikCode == 0x29) then {
_nil = ["Tilde"] execVM "fixes\keys.sqf";
_handled = true;
};

if (_dikCode == 0xC7) then {
_nil = ["Home"] execVM "fixes\keys.sqf";
_handled = true;
};

if (_dikCode == 0x3B) then {
_nil = ["F1"] execVM "fixes\keys.sqf";
_handled = true;
};

if (_dikCode == 0x19 && _shift) then {
_nil = ["ShiftP"] execVM "fixes\keys.sqf";
_handled = true;
};

keys.sqf
private ["_time","_presskey","_key"];
_key = _this select 0;
_time = 15;
_presskey = true;

/* Allowed List */
if ((getPlayerUID player) in ["111222333","444555666","777888999"]) exitWith {
//diag_log("PRESSKEY: Test OK!");
};

disableSerialization;
disableUserInput true;

if(_presskey) then {
switch (_key) do
{
case "Decimal":
{
player setVariable["startcombattimer",1,true];
};
case "Tilde":
{
player setVariable["startcombattimer",1,true];
};
case "Home":
{
player setVariable["startcombattimer",1,true];
};
case "F1":
{
player setVariable["startcombattimer",1,true];
};
case "ShiftP":
{
player setVariable["startcombattimer",1,true];
};
};
(findDisplay 106) closeDisplay 0;
PVDZE_atp = format["PRESSKEY: Player %1 (%2) press %3 Key. Pos: %4 %5",name player,getPlayerUID player,_key,mapGridPosition(getPosATL player),getPosATL player];
publicVariableServer "PVDZE_atp";
startLoadingScreen ["Зафикисровано нажатие запрещенных клавиш!", "DayZ_loadingScreen"];
sleep _time;
endLoadingScreen;
(findDisplay 46) closeDisplay 0;
};

https://community.bistudio.com/wiki/DIK_KeyCodes
« Последнее редактирование: Марта 01, 2016, 11:38:46 am от ReloadeD »