Новости

SMF - Just Installed!

Просмотр сообщений

В этом разделе можно просмотреть все сообщения, сделанные этим пользователем.


Сообщения - ReloadeD

Страницы: 1 2
11
init.sqf
[] execVM "Scripts\chat_kick.sqf";

chat_kick.sqf
if ((getPlayerUID player) in ["11111111111111111","22222222222222222","333333333333333333"]) exitWith {}; //admins, moderators
private ["_maxSeconds", "_seconds"];
_maxSeconds = 10;
_seconds = 0;
while {true} do
{
waitUntil {(!isNull findDisplay 55) and (!isNull findDisplay 63) and (ctrlText ((findDisplay 63) displayCtrl 101) == localize "STR_CHANNEL_SIDE")};
cutText ["НЕ ГОВОРИТЕ В ОБЩИЙ КАНАЛ СВЯЗИ!", "PLAIN"];
systemChat format["При повторном разговоре в общий канал, Вы будете убиты через: %1 сек.", (_maxSeconds - _seconds)];
if (_seconds >= _maxSeconds) then
{player setDamage 1;}; 
_seconds = _seconds + 1;
sleep 1;
};

12
compiles.sqf
	player_death =				compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf"; //найти
player_death = compile preprocessFileLineNumbers "custom\player_death.sqf"; //заменить

AH.sqf
					[] spawn (compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_death.sqf'); //найти
[] spawn (compile preprocessFileLineNumbers 'custom\player_death.sqf'); //заменить

player_death.sqf
private ["_display","_body","_playerID","_array","_source","_method","_canHitFree","_isBandit","_punishment","_humanityHit","_myKills","_humanity","_kills","_killsV","_myGroup"];
disableSerialization;
if (deathHandled) exitWith {};
deathHandled = true;
if ((alive player) && {isNil {dayz_playerName}}) then {
dayz_playerName = name player;
};
//Prevent client freezes
_display = findDisplay 49;
if(!isNull _display) then {_display closeDisplay 0;};
if (dialog) then {closeDialog 0;};
if (visibleMap) then {openMap false;};
disableUserInput true;

_body = player;
if (alive _body) then {
_body2 = _body;
_body2 setDamage 1;
};

_body spawn {
"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 0;
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [2];
"dynamicBlur" ppEffectCommit 0;
showCinemaBorder true;
camUseNVG false;
_dead_s = "camera" camCreate [(getPosATL _this select 0), (getPosATL _this select 1),(getPosATL _this select 2)+4];
_dead_s cameraEffect ["internal","back"];

_dead_s camSetFOV 2;
_dead_s camSetTarget (vehicle _this);
_dead_s camCommit 0;
waitUntil {camCommitted _dead_s};
sleep 3;
_dead_s camSetTarget [(getPosATL _this select 0), (getPosATL _this select 1),(getPosATL _this select 2)+800];
_dead_s camSetRelPos [0,5,0];
_dead_s camCommit 80;
};
_playerID = getPlayerUID player;
_infected = 0;

PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,_infected, dayz_playerName];
publicVariableServer "PVDZE_plr_Died";

_id = [player,20,true,getPosATL player] call player_alertZombies;

sleep 0.5;

0.1 fadeSound 0;
 
player setVariable ["NORRN_unconscious", false, true];
player setVariable ["unconsciousTime", 0, true];
player setVariable ["USEC_isCardiac",false,true];
player setVariable ["medForceUpdate",true,true];
player setVariable ["startcombattimer", 0];
r_player_unconscious = false;
r_player_cardiac = false;
if (Rangenveh > 0) then {
Rangenveh = 0;
    VEHSAFE setVariable["Rangenveh",0,true];
};

_array = _this;
if (count _array > 0) then {
_source = _array select 0;
_method = _array select 1;
if ((!isNull _source) && (_source != player)) then {
_humanity = 0;
_wait = 0.1;
_DeadBandit = false;
_KillerBandit = false;
_Deadherou = false;
_Dead_kepka = false;
_Killerherou = false;
_Killer_kepka = false;
_DeadHumanity = player getVariable["humanity",0];
if (_DeadHumanity <= -2500) then {_DeadBandit = true;};
if (_DeadHumanity >= 3000) then {_Deadherou = true;};
if ((!_DeadBandit) && (!_Deadherou)) then {_Dead_kepka = true;};

_KillerHumanity = _source getVariable["humanity",0];
if (_KillerHumanity <= -2500) then {_KillerBandit = true;};
if (_KillerHumanity >= 3000) then {_Killerherou = true;};
if ((!_KillerBandit) && (!_Killerherou)) then {_Killer_kepka = true;};

if (_DeadBandit) then
{
_kills = _source getVariable ["banditKills",0];
_source setVariable ["banditKills",(_kills + 1),true];
}
else
{
_kills = _source getVariable ["humanKills",0];
_source setVariable ["humanKills",(_kills + 1),true];
};


if (_Deadherou) then { //убили героя
// убийца герой
if (_Killerherou) then {
             _humanity = -4000;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};

// убийца бандит
    if (_KillerBandit) then {
            _humanity = -3000;
};

// убийца кепка
    if (_Killer_kepka) then {
            _humanity = -3500;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};

};

if (_DeadBandit) then { //убили бандита
// убийца герой
if (_Killerherou) then {
             _humanity = 400;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};
// убийца бандит
if (_KillerBandit) then {
            _humanity = 600;
_i = -((_DeadHumanity / 1000) * 1.2);
_humanity = round(_humanity + _i);
};
// убийца кепка
if (_Killer_kepka) then {
            _humanity = 500;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};
};

if (_Dead_kepka) then { //убили кепку
// убийца герой
if (_Killerherou) then {
             _humanity = -3000;

};
// убийца бандит
if (_KillerBandit) then {
            _humanity = -2000;

};
// убийца кепка
if (_Killer_kepka) then {
            _humanity = -2500;

};
};

PVDZE_send = [_source,"Humanity",[_source,_humanity,_wait]];
publicVariableServer "PVDZE_send";



};
_body setVariable ["deathType",_method,true];
};

terminate dayz_musicH;
terminate dayz_slowCheck;
terminate dayz_animalCheck;
terminate dayz_monitor1;
terminate dayz_medicalH;
terminate dayz_gui;

r_player_dead = true;

//Player is Dead!
3 fadeSound 0;
sleep 1;

dayz_originalPlayer enableSimulation true;

addSwitchableUnit dayz_originalPlayer;
setPlayable dayz_originalPlayer;
selectPlayer dayz_originalPlayer;

//deleteGroup _myGroup;
1 cutRsc ["default", "PLAIN",3];
2 cutRsc ["default", "PLAIN",3];
3 cutRsc ["default", "PLAIN",3];
4 cutRsc ["default", "PLAIN",3];

_body setVariable["combattimeout", 0, true];

//["dayzFlies",player] call broadcastRpcCallAll;
sleep 2;

//1 cutRsc ["DeathScr","BLACK OUT",3];

playMusic "dayz_track_death_1";

"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 0;
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [2];
"dynamicBlur" ppEffectCommit 0; "colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 0;
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [2];
"dynamicBlur" ppEffectCommit 0;
_listsT = [
"Name Server" //Текст внизу экрана
];
_memberFunction = _listsT call BIS_fnc_selectRandom;

_finalText = format ["<t color='#999999'  size='0.9' align='center'>%1</t>", _memberFunction];
[_finalText, 0,(safezoneY + safezoneH * 0.75), 20, 0, 0, 31] spawn BIS_fnc_dynamicText;

_finalText2 ="<t size='2.2' color='#FF0000'>Вы мертвы</t>"; //Текст в центре экрана
[_finalText2,0,(safezoneY + safezoneH * 0.43),5,1,0,32] spawn BIS_fnc_dynamicText;

_finalText3 = "<t size='1.5' font='TahomaB' color='#FFFFFF'>vk.com/groupname</t>"; //Текст сверху экрана
[_finalText3,0,(safezoneY + safezoneH * 0.05),300,1,0,33] spawn BIS_fnc_dynamicText;

for  "_x" from 16 to 1 step -1 do {
_finalText4 = format["<t size='0.8' color='#FFFFFF'>Выход через %1 сек.</t>",_x];
[_finalText4,0,(safezoneY + safezoneH * 0.9),3,0,0,34] spawn BIS_fnc_dynamicText;
sleep 1;
};

PVDZE_Server_Simulation = [_body, false];
publicVariableServer "PVDZE_Server_Simulation";

endMission "END1";

13
extra_rc.hpp
    class ItemGPS {
        class locate  {
            text = "Поиск по ключу";
            script = "execVM 'custom\keycheck.sqf'";
        };
    };

keycheck.sqf
private ["_inv","_searchString","_ID","_found","_targetColor","_finalID","_targetPosition","_targetVehicle","_count","_key","_keyName"];
_inv = [player] call BIS_fnc_invString;
_keyColor = [];
_keyID = [];
_removedID = [];
_count = 0;
closedialog 0;
{
for "_i" from 1 to 2500 do {
_searchString = format ["ItemKey%1%2",_x,str(_i)];
if ((_searchString in _inv)) then {
_count = _count + 1;
_targetColor = _x;
_keyColor = _keyColor + [_targetColor];
_ID = str(_i);
_ID = parseNumber _ID;
if (_targetColor == "Green") then { _finalID = _ID; };
if (_targetColor == "Red") then { _finalID = _ID + 2500; };
if (_targetColor == "Blue") then { _finalID = _ID + 5000; };
if (_targetColor == "Yellow") then { _finalID = _ID + 7500; };
if (_targetColor == "Black") then { _finalID = _ID + 10000; };
_keyID = _keyID + [_finalID];
_removedID = _removedID + [_ID];
};
};
} forEach ["Black","Yellow","Blue","Green","Red"];

if (_count > 0) then {
systemChat format ["Выполняется поиск для %1 ключей...",_count];
_count = _count - 1;
_i = 0;
for "_i" from 0 to _count do {
_finalID = _keyID select _i;
_ID = _removedID select _i;
_targetColor = _keyColor select _i;
_key = format["ItemKey%1%2",_targetColor,_ID];
_keyName = getText (configFile >> "CfgWeapons" >> _key >> "displayName");
_found = 0;

{
private ["_tID","_vehicle_type"];
_vehicle_type = typeOf _x;
_tID = parseNumber (_x getVariable ["CharacterID","0"]);
if ((_tID == _finalID) && ((_vehicle_type isKindOf "Air") || (_vehicle_type isKindOf "LandVehicle") || (_vehicle_type isKindOf "Ship"))) then {
_targetPosition = mapGridPosition getPos _x;
_targetVehicle = _x;
_found = 1;
};
} forEach vehicles;

if (_found != 0) then {
_vehicleName = gettext (configFile >> "CfgVehicles" >> (typeof _targetVehicle) >> "displayName");
systemChat format ["По ключу %1 найдена техника %2, координаты: %3",_keyName,_vehicleName,_targetPosition];
} else {
systemChat format ["Техника соответствующая ключу %1 была уничтожена",_keyName];
};
};
} else {
systemChat "Для поиска необходимо иметь не менее одного ключа!";
};


AH.sqf
vehicles = [vehicle player]; //найти
vehicles = vehicles; //заменить
if (isNil 'vehicles') then {vehicles = [];} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};}; //найти
if (isNil 'vehicles') then {vehicles = vehicles;} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};}; //заменить

14
fn_selfActions.sqf
	_isVehicleCombo = _typeOfCursorTarget in ["ArmoredSUV_PMC_DZE","BRDM2_HQ_TK_GUE_EP1"];
	_isVehicleCombo = (_cursorTarget isKindOf "SUV_Base_EP1" || _cursorTarget isKindOf "ArmoredSUV_Base_PMC");

	if ((_isVehicleCombo) && (!locked _cursorTarget) && (!_inVehicle) && (player distance _cursorTarget < 5) && (_canDo) && (_ownerID == "0")) then {
if (s_player_makeVehKey < 0) then {
s_player_makeVehKey = player addaction [("<t color=""#3366FF"">" + ("Установить замок") +"</t>"),"custom\player_makeVehKey.sqf",_cursorTarget,-10,false,true,"",""];
};
} else {
player removeAction s_player_makeVehKey;
s_player_makeVehKey = -1;
};

player_makeVehKey.sqf

private ["_vehicle","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_isOk","_isDamaged","_isOpen","_countplayers","_itemToolbox","_itemKeyKit","_itemCombo","_itemTin","_vehname","_hitpoints"];
_vehicle = _this select 3;
_isDamaged = false;
_isOpen = _vehicle getVariable ["CharacterID","0"];
_countplayers = count nearestObjects [player, ["CAManBase"], 12];
_itemToolbox = "ItemToolbox" in items player;
_itemKeyKit = "ItemKeyKit" in items player;
_itemCombo = {_x == "ItemComboLock"} count magazines player;
_itemTin = {_x == "ItemTinBar"} count magazines player;

_hitpoints = _vehicle call vehicle_getHitpoints;
{
    if ( ([_vehicle,_x] call object_getHit) > 0) then
    {
        _isDamaged = true;
    };
} forEach _hitpoints;

if (_countplayers > 1) exitWith {systemchat "Анти-Дюп : Вы не можете выполнить это действие, если рядом с Вами игрок или зомби!"; DZE_ActionInProgress = false;};

if (!_itemToolbox) exitWith { cutText ["Для установки замка нужен Набор инструментов!" , "PLAIN DOWN"]; };

if (!_itemKeyKit) exitWith { cutText ["Для установки замка нужен Набор для создания ключей!" , "PLAIN DOWN"]; };

if (DZE_ActionInProgress) exitWith { cutText ["Установка уже выполняется!" , "PLAIN DOWN"]; };

if (_isDamaged) exitWith
{
_vehname = getText (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName");
    cutText [format["Вы должны отремонтировать %1 перед установкой замка",_vehname], "PLAIN DOWN"];
};

if ((_itemCombo >= 1) && (_itemTin >= 1)) then
{
if (_isOpen == "0") then
{
DZE_ActionInProgress = true;
player removeAction s_player_makeVehKey;
player playActionNow "Medic";
_vehicle setVehicleLock "LOCKED";
PVDZE_veh_Lock = [_vehicle,true];
publicVariable "PVDZE_veh_Lock";
sleep 4;

_keyColor = ["Green","Red","Blue","Yellow","Black"] call BIS_fnc_selectRandom;
_keyNumber = (floor(random 2500)) + 1;
_keySelected = format[("ItemKey%1%2"),_keyColor,_keyNumber];
_isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected);
_config = _keySelected;
_isOk = [player,_config] call BIS_fnc_invAdd;
_characterID = str(getNumber(configFile >> "CfgWeapons" >> _keySelected >> "keyid"));

waitUntil {!isNil "_isOk"};

if (_isOk and _isKeyOK) then
{
PVDZE_veh_Upgrade = [_vehicle,[(getDir _vehicle),(getposATL _vehicle)],(typeOf _vehicle),true,_characterID,player];
publicVariableServer "PVDZE_veh_Upgrade";
player removeMagazine "ItemComboLock";
player removeMagazine "ItemTinBar";
_vehicle setVehicleLock "LOCKED";
PVDZE_veh_Lock = [_vehicle,true];
publicVariable "PVDZE_veh_Lock";
DZE_ActionInProgress = false;
_vehname = getText (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName");
cutText [format["Вы установили замок на %1 \n Пожалуйста, подождите пока сервер обновит транспорт в базе данных...",_vehname], "PLAIN DOWN"];
}
else
{
_vehicle setVehicleLock "UNLOCKED";
PVDZE_veh_Lock = [_vehicle,false];
publicVariable "PVDZE_veh_Lock";
_vehname = getText (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName");
cutText [format["Вам не удалось установить замок на %1... \n Проверьте свободное место в снаряжении для ключа.",_vehname], "PLAIN DOWN"];
DZE_ActionInProgress = false;
};
}
else
{
_vehname = getText (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName");
cutText [format["На %1 уже установлен замок",_vehname], "PLAIN DOWN"];
DZE_ActionInProgress = false;
};
}
else
{
_vehname = getText (configFile >> "CfgVehicles" >> (typeof _vehicle) >> "displayName");
cutText [format["Для установки замка на %1 требуется Combination Lock и Tin Bar.",_vehname], "PLAIN DOWN"];
DZE_ActionInProgress = false;
};

AHconfig.sqf
_dayzActions =
[
"s_player_makeVehKey"  //добавить
];

15
extra_rc.hpp
    class ItemGPS {
class scanzed {
text = "Сканировать зомби";
script = "[""scanzed""] execVM ""custom\scanner.sqf"";";
};
class scanveh {
text = "Сканировать транспорт";
script = "[""scanveh""] execVM ""custom\scanner.sqf"";";
};
class scanman {
text = "Сканировать ботов/игроков";
script = "[""scanman""] execVM ""custom\scanner.sqf"";";
};
    };

scanner.sqf
private ["_radiusZed","_radiusMan","_radiusVeh","_timeCheck","_plrHumanity","_itemGPS","_itemRadio","_humanityZed","_humanityMan","_humanityVeh","_zedcount","_plrcount","_mancount","_vehcount","_random","_option"];

_option = _this select 0;
_random = random 10;

/* config */
_radiusZed = 400; // radius for zombies
_radiusMan = 300; // radius for humans
_radiusVeh = 500; // radius for vehicles
_timeCheck = 600; // wait time, seconds
_itemGPS = "ItemGPS" in items player;
_itemRadio = "ItemRadio" in items player;
_plrHumanity = (player getVariable["humanity",0]);
_humanityZed = 5000; // humanity for scan zombies
_humanityMan = 10000; // humanity for scan humans
_humanityVeh = 7500; // humanity for scan vehicles
/* config */

if (dayz_combat == 1) exitWith {cutText [format["\n \n Невозможно сканировать в бою!"], "PLAIN DOWN"];};

if (!_itemGPS) exitWith {cutText [format["\n \n Для сканирования требуется GPS "], "PLAIN DOWN"];};

if (!_itemRadio) exitWith {cutText [format["\n \n Для сканирования требуется Радио "], "PLAIN DOWN"];};

if (isNil "lastScan") then {
lastScan = 0;
};

switch (_option) do
{
case "scanzed":
{
if (_plrHumanity >= _humanityZed)  then {
if (_random >= 0.2) then {
if (_random >= 0.3) then {
if (lastScan == 0 || (diag_tickTime-lastScan) > _timeCheck) then {
_zedcount = count ((position player) nearEntities ["zZombie_Base", _radiusZed]);
(findDisplay 106) closeDisplay 0;
systemChat ("[Сканер]: Соединение со спутником...");
sleep 3;
if (_zedcount >= 1) then {systemchat format["[Сканер]: Обнаружено %1 зомби в радиусе %2 метров.",_zedcount,_radiusZed];} else {
systemchat format["[Сканер]: Зомби в радиусе %1 метров не обнаружено.",_radiusZed];};
lastScan = diag_tickTime;
} else {
systemchat format["[Сканер]: Канал связи недоступен. Повторное сканирование возможно через %1 секунд...",(round (_timeCheck  - (diag_tickTime-lastScan)))];
};
}  else {
player removeWeapon "ItemRadio";
systemchat "[Сканер]: Рация вышла из строя! Сканирование невозможно...";
};
}  else {
player removeWeapon "ItemRadio";
player removeWeapon "ItemGPS";
systemchat "[Сканер]: Рация и GPS вышли из строя! Сканирование невозможно...";
};
}  else {
systemchat format["[Сканер]: Недостаточно репутации для сканирования. Необходимо набрать еще %1 ...",(round (_humanityZed - _plrHumanity))];
};
};
case "scanman":
{
if (_plrHumanity >= _humanityMan)  then {
if (_random >= 0.4) then {
if (_random >= 0.5) then {
if (lastScan == 0 || (diag_tickTime-lastScan) > _timeCheck) then {
_plrcount = count ((position player) nearEntities ["CAManBase", _radiusMan]);
_zedcount = count ((position player) nearEntities ["zZombie_Base", _radiusMan]);
_mancount = (_plrcount - _zedcount);
(findDisplay 106) closeDisplay 0;
systemChat ("[Сканер]: Соединение со спутником...");
sleep 3;
if (_mancount >= 2) then {systemchat format["[Сканер]: Обнаружено %1 живых объектов в радиусе %2 метров.",(_mancount - 1),_radiusMan];} else {
systemchat format["[Сканер]: Живых объектов в радиусе %1 метров не обнаружено.",_radiusMan];};
lastScan = diag_tickTime;
} else {
systemchat format["[Сканер]: Канал связи недоступен. Повторное сканирование возможно через %1 секунд...",(round (_timeCheck  - (diag_tickTime-lastScan)))];
};
} else {
player removeWeapon "ItemRadio";
systemchat "[Сканер]: Рация вышла из строя! Сканирование невозможно...";
};
}  else {
player removeWeapon "ItemRadio";
player removeWeapon "ItemGPS";
systemchat "[Сканер]: Рация и GPS вышли из строя! Сканирование невозможно...";
};
}  else {
systemchat format["[Сканер]: Недостаточно репутации для сканирования. Необходимо набрать еще %1 ...",(round (_humanityMan - _plrHumanity))];
};
};
case "scanveh":
{
if (_plrHumanity >= _humanityVeh)  then {
if (_random >= 0.3) then {
if (_random >= 0.4) then {
if (lastScan == 0 || (diag_tickTime-lastScan) > _timeCheck) then {
_vehcount = count ((position player) nearEntities [["LandVehicle","Air","Ship","Tank"], _radiusVeh]);
(findDisplay 106) closeDisplay 0;
systemChat ("[Сканер]: Соединение со спутником...");
sleep 3;
if (_vehcount >= 1) then {systemchat format["[Сканер]: Обнаружено %1 единиц транспорта в радиусе %2 метров.",_vehcount,_radiusVeh];} else {
systemchat format["[Сканер]: Транспорт в радиусе %1 метров не обнаружен.",_radiusVeh];};
lastScan = diag_tickTime;
} else {
systemchat format["[Сканер]: Канал связи недоступен. Повторное сканирование возможно через %1 секунд...",(round (_timeCheck  - (diag_tickTime-lastScan)))];
};
}  else {
player removeWeapon "ItemRadio";
systemchat "[Сканер]: Рация вышла из строя! Сканирование невозможно...";
};
}  else {
player removeWeapon "ItemRadio";
player removeWeapon "ItemGPS";
systemchat "[Сканер]: Рация и GPS вышли из строя! Сканирование невозможно...";
};
}  else {
systemchat format["[Сканер]: Недостаточно репутации для сканирования. Необходимо набрать еще %1 ...",(round (_humanityVeh - _plrHumanity))];
};
};
case default {hint "Error! nothing selected!!!"};
};

Страницы: 1 2