Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
GhostDZ

[Гайд] Plot4Life + SnapPro + BuiltVectors все в одном

Recommended Posts

Всем хорошим людям добрый день.

 

Предисловие:

Очень давно я удалил этот гайд с этого сайта. ВОт решил восстановить.

Скрипты P4L, SnapPro и BuiltVectors обновились, теперь собрать их вместе сложнее чем раньше но все еще возможно.

 

Это более старая но проверенная временем версия которая содержит солянку из Plot4Life, SnapPro, BuiltVectors и Admin Build.

 

1. Качаем архив прикрепленный к теме.

2. Папку custom забрасываем в корень миссии

3. Открываем файл init.sqf и после:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions

 

 

вставьте:

call compile preprocessFileLineNumbers "custom\compiles1.sqf";  

ну или если вы прошаренный пользователь, можете перенести все значения из моего файла в свой кастомный compiles.

Прошу обратить внимание на тот момент что если у вас в миссии уже есть такие файлы то их нужно совместить, тут вам поможет плагин compare для Notepad++.

4. Все в том же init.sqf ниже:

DZE_BuildOnRoads

Вставьте:

DZE_noRotate = []; //То что нельзя вращать. Ex: DZE_noRotate = ["VaultStorageLocked"]
DZE_curPitch = 45; //Стартовый угол наклона. Доступны только эти цифры1, 5, 45, 90.
WG_adminBuild = ["","","",""]; //Админские SteamID

5. Идем в server_functions.sqf и находим там:

dayz_objectUID2 = {
тут весь код функции
};

заменяем всю функцию на:

dayz_objectUID2 = {
	private["_position","_dir","_key"];
	if((count _this) == 2) then{
		_dir = _this select 0;
		_key = "";
		_position = _this select 1;
		{
			_x = _x * 10;
			if ( _x < 0 ) then { _x = _x * -10 };
			_key = _key + str(round(_x));
		} count _position;
		_key = _key + str(round(_dir));
	}else{
		if((count _this) == 3) then{
					if(typename (_this select 2) == "ARRAY")then{
							_vector = _this select 2;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
										_key = "";
										_position = _this select 1;
										{
											_x = _x * 10;
											if ( _x < 0 ) then { _x = _x * -10 };
											_key = _key + str(round(_x));
										} count _position;
										
										_vecCnt = 0;
										{
											_set = _x;
											{
												_vecCnt = _vecCnt + (round (_x * 100))
												
											} foreach _set;
											
										} foreach _vector;
										if(_vecCnt < 0)then{
											_vecCnt = ((_vecCnt * -1) * 3);
										};
										_key = _key + str(_vecCnt);	
								}else{
									_dir = _this select 0;
									_key = "";
									_position = _this select 1;
									{
										_x = _x * 10;
										if ( _x < 0 ) then { _x = _x * -10 };
										_key = _key + str(round(_x));
									} count _position;
									_key = _key + str(round(_dir));
								};
							}else{
								_dir = _this select 0;
								_key = "";
								_position = _this select 1;
								{
									_x = _x * 10;
									if ( _x < 0 ) then { _x = _x * -10 };
									_key = _key + str(round(_x));
								} count _position;
								_key = _key + str(round(_dir));
							};
						
					}else{
						_dir = _this select 0;
						_key = "";
						_position = _this select 1;
						{
							_x = _x * 10;
							if ( _x < 0 ) then { _x = _x * -10 };
							_key = _key + str(round(_x));
						} count _position;
						_key = _key + str(round(_dir));
					};
		}else{
			if((count _this) == 4) then{
					if(typename (_this select 3) == "ARRAY")then{
						_vector = _this select 3;
						if(count _vector == 2)then{
							if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
										_key = "";
										_position = _this select 1;
										{
											_x = _x * 10;
											if ( _x < 0 ) then { _x = _x * -10 };
											_key = _key + str(round(_x));
										} count _position;
										
										_vecCnt = 0;
										{
											_set = _x;
											{
												_vecCnt = _vecCnt + (round (_x * 100))
												
											} foreach _set;
											
										} foreach _vector;
										if(_vecCnt < 0)then{
											_vecCnt = ((_vecCnt * -1) * 3);
										};
										_key = _key + str(_vecCnt);	
							}else{
								_dir = _this select 0;
								_key = "";
								_position = _this select 1;
								{
									_x = _x * 10;
									if ( _x < 0 ) then { _x = _x * -10 };
									_key = _key + str(round(_x));
								} count _position;
								_key = _key + str(round(_dir));
							};
						}else{
							_dir = _this select 0;
							_key = "";
							_position = _this select 1;
							{
								_x = _x * 10;
								if ( _x < 0 ) then { _x = _x * -10 };
								_key = _key + str(round(_x));
							} count _position;
							_key = _key + str(round(_dir));
						};
					}else{
						if(typename (_this select 2) == "ARRAY")then{
							_vector = _this select 2;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
											_key = "";
											_position = _this select 1;
											{
												_x = _x * 10;
												if ( _x < 0 ) then { _x = _x * -10 };
												_key = _key + str(round(_x));
											} count _position;
											
											_vecCnt = 0;
											{
												_set = _x;
												{
													_vecCnt = _vecCnt + (round (_x * 100))
													
												} foreach _set;
												
											} foreach _vector;
											if(_vecCnt < 0)then{
												_vecCnt = ((_vecCnt * -1) * 3);
											};
											_key = _key + str(_vecCnt);	
								}else{
									_dir = _this select 0;
									_key = "";
									_position = _this select 1;
									{
										_x = _x * 10;
										if ( _x < 0 ) then { _x = _x * -10 };
										_key = _key + str(round(_x));
									} count _position;
									_key = _key + str(round(_dir));
								};
							}else{
								_dir = _this select 0;
								_key = "";
								_position = _this select 1;
								{
									_x = _x * 10;
									if ( _x < 0 ) then { _x = _x * -10 };
									_key = _key + str(round(_x));
								} count _position;
								_key = _key + str(round(_dir));
							};
						}else{
							_dir = _this select 0;
							_key = "";
							_position = _this select 1;
							{
								_x = _x * 10;
								if ( _x < 0 ) then { _x = _x * -10 };
								_key = _key + str(round(_x));
							} count _position;
							_key = _key + str(round(_dir));
						};
					};
			}else{
				_dir = _this select 0;
				_key = "";
				_position = _this select 1;
				{
					_x = _x * 10;
					if ( _x < 0 ) then { _x = _x * -10 };
					_key = _key + str(round(_x));
				} count _position;
				_key = _key + str(round(_dir));
			};
		};
		
	};
	_key
};

6. Идем в server_monitor.sqf и находим там:

// # NOW SPAWN OBJECTS #

тут много кода

// # END SPAWN OBJECTS # 

все что между этими строками заменяем на:

	// # NOW SPAWN OBJECTS #
	_totalvehicles = 0;
	{
		_idKey = 		_x select 1;
		_type =			_x select 2;
		_ownerID = 		_x select 3;

		_worldspace = 	_x select 4;
		_intentory =	_x select 5;
		_hitPoints =	_x select 6;
		_fuel =			_x select 7;
		_damage = 		_x select 8;
		
		_dir = 0;

		
		_pos = [0,0,0];
		_wsDone = false;
		if (count _worldspace >= 2) then
		{
			if ((typeName (_worldspace select 0)) == "STRING") then {
				_worldspace set [0, call compile (_worldspace select 0)];
				_worldspace set [1, call compile (_worldspace select 1)];
			};
			_dir = _worldspace select 0;
			if (count (_worldspace select 1) == 3) then {
				_pos = _worldspace select 1;
				_wsDone = true;
			}
		};	
		
		if (!_wsDone) then {
			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
		};
		
		_vector = [[0,0,0],[0,0,0]];
		_vecExists = false;
		_ownerPUID = "0";
		if (count _worldspace >= 3) then{
			if(count _worldspace == 3) then{
					if(typename (_worldspace select 2) == "STRING")then{
						_ownerPUID = _worldspace select 2;
					}else{
						 if(typename (_worldspace select 2) == "ARRAY")then{
							_vector = _worldspace select 2;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
									_vecExists = true;
								};
							};
						};					
					};
					
			}else{
				//Was not 3 elements, so check if 4 or more
				if(count _worldspace == 4) then{
					if(typename (_worldspace select 3) == "STRING")then{
						_ownerPUID = _worldspace select 3;
					}else{
						if(typename (_worldspace select 2) == "STRING")then{
							_ownerPUID = _worldspace select 2;
						};
					};
			
			
					if(typename (_worldspace select 2) == "ARRAY")then{
						_vector = _worldspace select 2;
						if(count _vector == 2)then{
							if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
								_vecExists = true;
							};
						};
					}else{
						if(typename (_worldspace select 3) == "ARRAY")then{
							_vector = _worldspace select 3;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
									_vecExists = true;
								};
							};
						};
					};
					
				}else{
					//More than 3 or 4 elements found
					//Might add a search for the vector, ownerPUID will equal 0
				};
			};
		};
		   	   
		// diag_log format["Server_monitor: [ObjectID = %1]  [ClassID = %2] [_ownerPUID = %3]", _idKey, _type, _ownerPUID];
		
		if (_damage < 1) then {
			//diag_log format["OBJ: %1 - %2", _idKey,_type];
			
			//Create it
			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
			_object setVariable ["lastUpdate",time];
			_object setVariable ["ObjectID", _idKey, true];

			_object setVariable ["OwnerPUID", _ownerPUID, true];
			_lockable = 0;
			if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
				_lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
			};

			// fix for leading zero issues on safe codes after restart
			if (_lockable == 4) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 3) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 2) then {
					_ownerID = format["00%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["000%1", _ownerID];
				};
			};

			if (_lockable == 3) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 2) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["00%1", _ownerID];
				};
			};

			_object setVariable ["CharacterID", _ownerID, true];
			
			clearWeaponCargoGlobal  _object;
			clearMagazineCargoGlobal  _object;
			// _object setVehicleAmmo DZE_vehicleAmmo;
			
			_object setdir _dir;
			
			if(_vecExists)then{
				_object setVectorDirAndUp _vector;
			};
			
			_object setposATL _pos;
			_object setDamage _damage;
			
			if ((typeOf _object) in dayz_allowedObjects) then {
				if (DZE_GodModeBase) then {
					_object addEventHandler ["HandleDamage", {false}];
				} else {
					_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
				};
				// Test disabling simulation server side on buildables only.
				_object enableSimulation false;
				// used for inplace upgrades && lock/unlock of safe
				_object setVariable ["OEMPos", _pos, true];
				
			};

			if (count _intentory > 0) then {
			
			    /*ZSC		
				if( count (_intentory) > 3)then{
				_object setVariable ["bankMoney", _intentory select 3, true];
				}else{
				_object setVariable ["bankMoney", 0, true];
				};				
				ZSC*/

				if (_type in DZE_LockedStorage) then {
					// Fill variables with loot
					_object setVariable ["WeaponCargo", (_intentory select 0),true];
					_object setVariable ["MagazineCargo", (_intentory select 1),true];
					_object setVariable ["BackpackCargo", (_intentory select 2),true];
				} else {

					//Add weapons
					_objWpnTypes = (_intentory select 0) select 0;
					_objWpnQty = (_intentory select 0) select 1;
					_countr = 0;					
					{
						if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
							_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
						};
						_isOK = 	isClass(configFile >> "CfgWeapons" >> _x);
						if (_isOK) then {
							_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
						};
						_countr = _countr + 1;
					} count _objWpnTypes; 
				
					//Add Magazines
					_objWpnTypes = (_intentory select 1) select 0;
					_objWpnQty = (_intentory select 1) select 1;
					_countr = 0;
					{
						if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
						if (_x == "ItemTent") then { _x = "ItemTentOld" };
						_isOK = 	isClass(configFile >> "CfgMagazines" >> _x);
						if (_isOK) then {
							_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
						};
						_countr = _countr + 1;
					} count _objWpnTypes;

					//Add Backpacks
					_objWpnTypes = (_intentory select 2) select 0;
					_objWpnQty = (_intentory select 2) select 1;
					_countr = 0;
					{
						_isOK = 	isClass(configFile >> "CfgVehicles" >> _x);
						if (_isOK) then {
							_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
						};
						_countr = _countr + 1;
					} count _objWpnTypes;
				};
			};	
			
			if (_object isKindOf "AllVehicles") then {
				{
					_selection = _x select 0;
					_dam = _x select 1;
					if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8};
					[_object,_selection,_dam] call object_setFixServer;
				} count _hitpoints;
				
				_object setFuel _fuel;
				if (!((typeOf _object) in dayz_allowedObjects)) then {
					
					//_object setvelocity [0,0,1];
					_object call fnc_veh_ResetEH;		
					
					if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then {
						_object setvehiclelock "locked";
					};
					
					_totalvehicles = _totalvehicles + 1;

					// total each vehicle
					serverVehicleCounter set [count serverVehicleCounter,_type];
				};
			};

			//Monitor the object
			PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
		};
	} count (_BuildingQueue + _objectQueue);
	// # END SPAWN OBJECTS # 

7. Идем в description.ext и в самый низ:

#include "custom\snap_pro\snappoints.hpp"

 

Все установка и настройка закончены, можно ставить ЭТО

BuildVectorsAdminP4lV3.zip

Share this post


Link to post
Share on other sites



А какая версия Plot4Life?

история умалчивает, но точно не 2.35 и выше

Share this post


Link to post
Share on other sites

Ругается на не объявленную переменную _OwnerPUID, возможно у некоторых объявлена переменная _OwnerID, вместо _OwnerPUID

Edited by SpiritWolf (see edit history)

Share this post


Link to post
Share on other sites

Кстати, плот почему-то после рестарта пропадает и в инвентаре появляется, как будто его откатывает назад. Как пофиксить?

Edited by SpiritWolf (see edit history)

Share this post


Link to post
Share on other sites

Плот и хранилища (локбоксы и сейфы) не записываются в БД.

В консоли это показывается. CHILD 308 cannot execute

Edited by SpiritWolf (see edit history)

Share this post


Link to post
Share on other sites

Плот и хранилища (локбоксы и сейфы) не записываются в БД.

В консоли это показывается. CHILD 308 cannot execute

где-то у вас косяк в установке.

логи давайте, может поможем

Share this post


Link to post
Share on other sites

где-то у вас косяк в установке.

логи давайте, может поможем

Вопрос решен. Эти системки конфликтовали с ультимовкими. Пришлось вырезать.

Share this post


Link to post
Share on other sites

Всем хорошим людям добрый день.

 

Предисловие:

Очень давно я удалил этот гайд с этого сайта. ВОт решил восстановить.

Скрипты P4L, SnapPro и BuiltVectors обновились, теперь собрать их вместе сложнее чем раньше но все еще возможно.

 

Это более старая но проверенная временем версия которая содержит солянку из Plot4Life, SnapPro, BuiltVectors и Admin Build.

 

1. Качаем архив прикрепленный к теме.

2. Папку custom забрасываем в корень миссии

3. Открываем файл init.sqf и после:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions

 

 

вставьте:

call compile preprocessFileLineNumbers "custom\compiles1.sqf";  

ну или если вы прошаренный пользователь, можете перенести все значения из моего файла в свой кастомный compiles.

Прошу обратить внимание на тот момент что если у вас в миссии уже есть такие файлы то их нужно совместить, тут вам поможет плагин compare для Notepad++.

4. Все в том же init.sqf ниже:

DZE_BuildOnRoads

Вставьте:

DZE_noRotate = []; //То что нельзя вращать. Ex: DZE_noRotate = ["VaultStorageLocked"]
DZE_curPitch = 45; //Стартовый угол наклона. Доступны только эти цифры1, 5, 45, 90.
WG_adminBuild = ["","","",""]; //Админские SteamID

5. Идем в server_functions.sqf и находим там:

dayz_objectUID2 = {
тут весь код функции
};

заменяем всю функцию на:

dayz_objectUID2 = {
	private["_position","_dir","_key"];
	if((count _this) == 2) then{
		_dir = _this select 0;
		_key = "";
		_position = _this select 1;
		{
			_x = _x * 10;
			if ( _x < 0 ) then { _x = _x * -10 };
			_key = _key + str(round(_x));
		} count _position;
		_key = _key + str(round(_dir));
	}else{
		if((count _this) == 3) then{
					if(typename (_this select 2) == "ARRAY")then{
							_vector = _this select 2;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
										_key = "";
										_position = _this select 1;
										{
											_x = _x * 10;
											if ( _x < 0 ) then { _x = _x * -10 };
											_key = _key + str(round(_x));
										} count _position;
										
										_vecCnt = 0;
										{
											_set = _x;
											{
												_vecCnt = _vecCnt + (round (_x * 100))
												
											} foreach _set;
											
										} foreach _vector;
										if(_vecCnt < 0)then{
											_vecCnt = ((_vecCnt * -1) * 3);
										};
										_key = _key + str(_vecCnt);	
								}else{
									_dir = _this select 0;
									_key = "";
									_position = _this select 1;
									{
										_x = _x * 10;
										if ( _x < 0 ) then { _x = _x * -10 };
										_key = _key + str(round(_x));
									} count _position;
									_key = _key + str(round(_dir));
								};
							}else{
								_dir = _this select 0;
								_key = "";
								_position = _this select 1;
								{
									_x = _x * 10;
									if ( _x < 0 ) then { _x = _x * -10 };
									_key = _key + str(round(_x));
								} count _position;
								_key = _key + str(round(_dir));
							};
						
					}else{
						_dir = _this select 0;
						_key = "";
						_position = _this select 1;
						{
							_x = _x * 10;
							if ( _x < 0 ) then { _x = _x * -10 };
							_key = _key + str(round(_x));
						} count _position;
						_key = _key + str(round(_dir));
					};
		}else{
			if((count _this) == 4) then{
					if(typename (_this select 3) == "ARRAY")then{
						_vector = _this select 3;
						if(count _vector == 2)then{
							if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
										_key = "";
										_position = _this select 1;
										{
											_x = _x * 10;
											if ( _x < 0 ) then { _x = _x * -10 };
											_key = _key + str(round(_x));
										} count _position;
										
										_vecCnt = 0;
										{
											_set = _x;
											{
												_vecCnt = _vecCnt + (round (_x * 100))
												
											} foreach _set;
											
										} foreach _vector;
										if(_vecCnt < 0)then{
											_vecCnt = ((_vecCnt * -1) * 3);
										};
										_key = _key + str(_vecCnt);	
							}else{
								_dir = _this select 0;
								_key = "";
								_position = _this select 1;
								{
									_x = _x * 10;
									if ( _x < 0 ) then { _x = _x * -10 };
									_key = _key + str(round(_x));
								} count _position;
								_key = _key + str(round(_dir));
							};
						}else{
							_dir = _this select 0;
							_key = "";
							_position = _this select 1;
							{
								_x = _x * 10;
								if ( _x < 0 ) then { _x = _x * -10 };
								_key = _key + str(round(_x));
							} count _position;
							_key = _key + str(round(_dir));
						};
					}else{
						if(typename (_this select 2) == "ARRAY")then{
							_vector = _this select 2;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
											_key = "";
											_position = _this select 1;
											{
												_x = _x * 10;
												if ( _x < 0 ) then { _x = _x * -10 };
												_key = _key + str(round(_x));
											} count _position;
											
											_vecCnt = 0;
											{
												_set = _x;
												{
													_vecCnt = _vecCnt + (round (_x * 100))
													
												} foreach _set;
												
											} foreach _vector;
											if(_vecCnt < 0)then{
												_vecCnt = ((_vecCnt * -1) * 3);
											};
											_key = _key + str(_vecCnt);	
								}else{
									_dir = _this select 0;
									_key = "";
									_position = _this select 1;
									{
										_x = _x * 10;
										if ( _x < 0 ) then { _x = _x * -10 };
										_key = _key + str(round(_x));
									} count _position;
									_key = _key + str(round(_dir));
								};
							}else{
								_dir = _this select 0;
								_key = "";
								_position = _this select 1;
								{
									_x = _x * 10;
									if ( _x < 0 ) then { _x = _x * -10 };
									_key = _key + str(round(_x));
								} count _position;
								_key = _key + str(round(_dir));
							};
						}else{
							_dir = _this select 0;
							_key = "";
							_position = _this select 1;
							{
								_x = _x * 10;
								if ( _x < 0 ) then { _x = _x * -10 };
								_key = _key + str(round(_x));
							} count _position;
							_key = _key + str(round(_dir));
						};
					};
			}else{
				_dir = _this select 0;
				_key = "";
				_position = _this select 1;
				{
					_x = _x * 10;
					if ( _x < 0 ) then { _x = _x * -10 };
					_key = _key + str(round(_x));
				} count _position;
				_key = _key + str(round(_dir));
			};
		};
		
	};
	_key
};

6. Идем в server_monitor.sqf и находим там:

// # NOW SPAWN OBJECTS #

тут много кода

// # END SPAWN OBJECTS # 

все что между этими строками заменяем на:

	// # NOW SPAWN OBJECTS #
	_totalvehicles = 0;
	{
		_idKey = 		_x select 1;
		_type =			_x select 2;
		_ownerID = 		_x select 3;

		_worldspace = 	_x select 4;
		_intentory =	_x select 5;
		_hitPoints =	_x select 6;
		_fuel =			_x select 7;
		_damage = 		_x select 8;
		
		_dir = 0;

		
		_pos = [0,0,0];
		_wsDone = false;
		if (count _worldspace >= 2) then
		{
			if ((typeName (_worldspace select 0)) == "STRING") then {
				_worldspace set [0, call compile (_worldspace select 0)];
				_worldspace set [1, call compile (_worldspace select 1)];
			};
			_dir = _worldspace select 0;
			if (count (_worldspace select 1) == 3) then {
				_pos = _worldspace select 1;
				_wsDone = true;
			}
		};	
		
		if (!_wsDone) then {
			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
		};
		
		_vector = [[0,0,0],[0,0,0]];
		_vecExists = false;
		_ownerPUID = "0";
		if (count _worldspace >= 3) then{
			if(count _worldspace == 3) then{
					if(typename (_worldspace select 2) == "STRING")then{
						_ownerPUID = _worldspace select 2;
					}else{
						 if(typename (_worldspace select 2) == "ARRAY")then{
							_vector = _worldspace select 2;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
									_vecExists = true;
								};
							};
						};					
					};
					
			}else{
				//Was not 3 elements, so check if 4 or more
				if(count _worldspace == 4) then{
					if(typename (_worldspace select 3) == "STRING")then{
						_ownerPUID = _worldspace select 3;
					}else{
						if(typename (_worldspace select 2) == "STRING")then{
							_ownerPUID = _worldspace select 2;
						};
					};
			
			
					if(typename (_worldspace select 2) == "ARRAY")then{
						_vector = _worldspace select 2;
						if(count _vector == 2)then{
							if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
								_vecExists = true;
							};
						};
					}else{
						if(typename (_worldspace select 3) == "ARRAY")then{
							_vector = _worldspace select 3;
							if(count _vector == 2)then{
								if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
									_vecExists = true;
								};
							};
						};
					};
					
				}else{
					//More than 3 or 4 elements found
					//Might add a search for the vector, ownerPUID will equal 0
				};
			};
		};
		   	   
		// diag_log format["Server_monitor: [ObjectID = %1]  [ClassID = %2] [_ownerPUID = %3]", _idKey, _type, _ownerPUID];
		
		if (_damage < 1) then {
			//diag_log format["OBJ: %1 - %2", _idKey,_type];
			
			//Create it
			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
			_object setVariable ["lastUpdate",time];
			_object setVariable ["ObjectID", _idKey, true];

			_object setVariable ["OwnerPUID", _ownerPUID, true];
			_lockable = 0;
			if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
				_lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
			};

			// fix for leading zero issues on safe codes after restart
			if (_lockable == 4) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 3) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 2) then {
					_ownerID = format["00%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["000%1", _ownerID];
				};
			};

			if (_lockable == 3) then {
				_codeCount = (count (toArray _ownerID));
				if(_codeCount == 2) then {
					_ownerID = format["0%1", _ownerID];
				};
				if(_codeCount == 1) then {
					_ownerID = format["00%1", _ownerID];
				};
			};

			_object setVariable ["CharacterID", _ownerID, true];
			
			clearWeaponCargoGlobal  _object;
			clearMagazineCargoGlobal  _object;
			// _object setVehicleAmmo DZE_vehicleAmmo;
			
			_object setdir _dir;
			
			if(_vecExists)then{
				_object setVectorDirAndUp _vector;
			};
			
			_object setposATL _pos;
			_object setDamage _damage;
			
			if ((typeOf _object) in dayz_allowedObjects) then {
				if (DZE_GodModeBase) then {
					_object addEventHandler ["HandleDamage", {false}];
				} else {
					_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
				};
				// Test disabling simulation server side on buildables only.
				_object enableSimulation false;
				// used for inplace upgrades && lock/unlock of safe
				_object setVariable ["OEMPos", _pos, true];
				
			};

			if (count _intentory > 0) then {
			
			    /*ZSC		
				if( count (_intentory) > 3)then{
				_object setVariable ["bankMoney", _intentory select 3, true];
				}else{
				_object setVariable ["bankMoney", 0, true];
				};				
				ZSC*/

				if (_type in DZE_LockedStorage) then {
					// Fill variables with loot
					_object setVariable ["WeaponCargo", (_intentory select 0),true];
					_object setVariable ["MagazineCargo", (_intentory select 1),true];
					_object setVariable ["BackpackCargo", (_intentory select 2),true];
				} else {

					//Add weapons
					_objWpnTypes = (_intentory select 0) select 0;
					_objWpnQty = (_intentory select 0) select 1;
					_countr = 0;					
					{
						if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
							_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
						};
						_isOK = 	isClass(configFile >> "CfgWeapons" >> _x);
						if (_isOK) then {
							_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
						};
						_countr = _countr + 1;
					} count _objWpnTypes; 
				
					//Add Magazines
					_objWpnTypes = (_intentory select 1) select 0;
					_objWpnQty = (_intentory select 1) select 1;
					_countr = 0;
					{
						if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
						if (_x == "ItemTent") then { _x = "ItemTentOld" };
						_isOK = 	isClass(configFile >> "CfgMagazines" >> _x);
						if (_isOK) then {
							_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
						};
						_countr = _countr + 1;
					} count _objWpnTypes;

					//Add Backpacks
					_objWpnTypes = (_intentory select 2) select 0;
					_objWpnQty = (_intentory select 2) select 1;
					_countr = 0;
					{
						_isOK = 	isClass(configFile >> "CfgVehicles" >> _x);
						if (_isOK) then {
							_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
						};
						_countr = _countr + 1;
					} count _objWpnTypes;
				};
			};	
			
			if (_object isKindOf "AllVehicles") then {
				{
					_selection = _x select 0;
					_dam = _x select 1;
					if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8};
					[_object,_selection,_dam] call object_setFixServer;
				} count _hitpoints;
				
				_object setFuel _fuel;
				if (!((typeOf _object) in dayz_allowedObjects)) then {
					
					//_object setvelocity [0,0,1];
					_object call fnc_veh_ResetEH;		
					
					if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then {
						_object setvehiclelock "locked";
					};
					
					_totalvehicles = _totalvehicles + 1;

					// total each vehicle
					serverVehicleCounter set [count serverVehicleCounter,_type];
				};
			};

			//Monitor the object
			PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
		};
	} count (_BuildingQueue + _objectQueue);
	// # END SPAWN OBJECTS # 

7. Идем в description.ext и в самый низ:

#include "custom\snap_pro\snappoints.hpp"

 

Все установка и настройка закончены, можно ставить ЭТО

ставить эТО это что??? вобще такое дополнение?? тогда почему его нет в туторе?

Share this post


Link to post
Share on other sites

ставить эТО это что??? вобще такое дополнение?? тогда почему его нет в туторе?

Как бы всё понятно вроде, не? Это чтобы после рестарта постройки не сдвигались.

Share this post


Link to post
Share on other sites

Добрый день! 

Помогите разобраться, а точнее подскажите что копать и куда глядеть. Проблема следующая: после установки данного чуда все прекрасно работает кроме сейфов. Устанавливаешь сейф, все нормально ставиться в бд он записывается. При наведении появляется меню открыть сейф, но при нажатии ничего не происходит=(

Я так понял что P4L позволяет владельцу плота в зоне которого стоит сейф не вводить код, а просто его открывать. Но самого действия открытия не происходит.

Вот собственно код обеспечивающий эту процедуру

//Allow owner to unlock vault
	if((_typeOfCursorTarget in DZE_LockableStorage) && _characterID  != "0" && (player distance _cursorTarget < 3)) then {
		if (s_player_unlockvault < 0) then {
			if(_typeOfCursorTarget in DZE_LockedStorage) then {
				if(_characterID == dayz_combination || _ownerID == _playerUID) then {
					_combi = player addAction [format["Открыть %1",_text], "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true, "",""];
					s_player_combi set [count s_player_combi,_combi];
				} else {
					_combi = player addAction [format["Разблокировать %1",_text], "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
					s_player_combi set [count s_player_combi,_combi];
				};
				s_player_unlockvault = 1;
			} else {
				if(_characterID != dayz_combination && _ownerID != _playerUID) then {
					_combi = player addAction ["Ввести код заново", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
					s_player_combi set [count s_player_combi,_combi];
					s_player_unlockvault = 1;
				};
			};
		};
	} else {
		{player removeAction _x} count s_player_combi;s_player_combi = [];
		s_player_unlockvault = -1;
	};

 Может чего пропусти при объединении fn_selfActions.sqf. 

Буду благодарен за помощь.  

Edited by vodkaman (see edit history)

Share this post


Link to post
Share on other sites
22 часа назад, vodkaman сказал:

Добрый день! 

Помогите разобраться, а точнее подскажите что копать и куда глядеть. Проблема следующая: после установки данного чуда все прекрасно работает кроме сейфов. Устанавливаешь сейф, все нормально ставиться в бд он записывается. При наведении появляется меню открыть сейф, но при нажатии ничего не происходит=(

Я так понял что P4L позволяет владельцу плота в зоне которого стоит сейф не вводить код, а просто его открывать. Но самого действия открытия не происходит.

Вот собственно код обеспечивающий эту процедуру


//Allow owner to unlock vault
	if((_typeOfCursorTarget in DZE_LockableStorage) && _characterID  != "0" && (player distance _cursorTarget < 3)) then {
		if (s_player_unlockvault < 0) then {
			if(_typeOfCursorTarget in DZE_LockedStorage) then {
				if(_characterID == dayz_combination || _ownerID == _playerUID) then {
					_combi = player addAction [format["Открыть %1",_text], "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true, "",""];
					s_player_combi set [count s_player_combi,_combi];
				} else {
					_combi = player addAction [format["Разблокировать %1",_text], "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
					s_player_combi set [count s_player_combi,_combi];
				};
				s_player_unlockvault = 1;
			} else {
				if(_characterID != dayz_combination && _ownerID != _playerUID) then {
					_combi = player addAction ["Ввести код заново", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
					s_player_combi set [count s_player_combi,_combi];
					s_player_unlockvault = 1;
				};
			};
		};
	} else {
		{player removeAction _x} count s_player_combi;s_player_combi = [];
		s_player_unlockvault = -1;
	};

 Может чего пропусти при объединении fn_selfActions.sqf. 

Буду благодарен за помощь.  

Все разобрался. Посмотрел клиентский лог, а в нем ошибка. Видимо при слиянии кастомных fn_selfActions.sqf поставил лишнюю запятую перед объявлением _characterID. 

Share this post


Link to post
Share on other sites

Поставил это на голую сборку, ставлю любой обьект он его не ставить сразу пишет строительство отменено вот что в логах: 

Error in expression <isBuildAdmin = (getPlayerUID player) in WG_adminBuild;
_vehicle = vehicle playe>
  Error position: <WG_adminBuild;
_vehicle = vehicle playe>
  Error Undefined variable in expression: wg_adminbuild
File mpmissions\__CUR_MP.Napf\custom\snap_pro\player_build.sqf, line 49
Error in expression < false;
_counter = 0;
while {_isOk && !_isBuildAdmin} do {
[10,10] call dayz_H>
  Error position: <_isBuildAdmin} do {
[10,10] call dayz_H>
  Error Undefined variable in expression: _isbuildadmin
File mpmissions\__CUR_MP.Napf\custom\snap_pro\player_build.sqf, line 628
Error in expression <sOk = false;
_proceed = true;
};
};
if (_isBuildAdmin) then {
_isOk = false;
_pr>
  Error position: <_isBuildAdmin) then {
_isOk = false;
_pr>
  Error Undefined variable in expression: _isbuildadmin
File mpmissions\__CUR_MP.Napf\custom\snap_pro\player_build.sqf, line 680
Error in expression <isBuildAdmin = (getPlayerUID player) in WG_adminBuild;
_vehicle = vehicle playe>
  Error position: <WG_adminBuild;
_vehicle = vehicle playe>
  Error Undefined variable in expression: wg_adminbuild
File mpmissions\__CUR_MP.Napf\custom\snap_pro\player_build.sqf, line 49
Error in expression < false;
_counter = 0;
while {_isOk && !_isBuildAdmin} do {
[10,10] call dayz_H>
  Error position: <_isBuildAdmin} do {
[10,10] call dayz_H>
  Error Undefined variable in expression: _isbuildadmin
File mpmissions\__CUR_MP.Napf\custom\snap_pro\player_build.sqf, line 628
Error in expression <sOk = false;
_proceed = true;
};
};
if (_isBuildAdmin) then {
_isOk = false;
_pr>
  Error position: <_isBuildAdmin) then {
_isOk = false;
_pr>
  Error Undefined variable in expression: _isbuildadmin
File mpmissions\__CUR_MP.Napf\custom\snap_pro\player_build.sqf, line 680

 

Edited by TheFirstNoob (see edit history)

Share this post


Link to post
Share on other sites

sanekxxz Не определена переменная wg_adminbuild

В миссии в файл init.sqf добавь wg_adminbuild = ["1111","22222"]; // вместо цифр вставить UID админов или оставить пустые скобки

Share this post


Link to post
Share on other sites

Этот PL4 на голую сборку и то с косяками устанавливается :D, всё установилось кроме Plota: 

11:46:56 File z\addons\dayz_server\init\server_functions.sqf, line 250
11:46:57 "PUBLISH: Attempt 2cbff040# 982804: m1151_m2_gpk.p3d"
11:46:58 "PUBLISH: Created UH60M_EP1_DZE with ID "127434364959128""
11:47:01 "PUBLISH: Created MH6J_DZ with ID "1291461048382160""
11:47:02 "PUBLISH: Attempt 2cbfd0c0# 982805: mmt.p3d"
11:47:02 "HIVE: WRITE: "CHILD:308:24:MMT_Civ:0:0:[130,[12528.5,5365.35,-0.0235138]]:[]:[]:0:125285536542130:""
11:47:02 Error in expression <imit = _random select 1;

_qty = {_x == _vehicle} count serverVehicleCounter;


>
11:47:02   Error position: <_vehicle} count serverVehicleCounter;


>
11:47:02   Error Undefined variable in expression: _vehicle
11:47:02 File z\addons\dayz_server\init\server_functions.sqf, line 250
11:47:02 Error in expression <imit = _random select 1;

_qty = {_x == _vehicle} count serverVehicleCounter;


>
11:47:02   Error position: <_vehicle} count serverVehicleCounter;


>
11:47:02   Error Undefined variable in expression: _vehicle
11:47:02 File z\addons\dayz_server\init\server_functions.sqf, line 250
11:47:02 Error in expression <unt serverVehicleCounter;


if (_qty <= _velimit) exitWith {};

_lastIndex = (>
11:47:02   Error position: <_velimit) exitWith {};

_lastIndex = (>
11:47:02   Error Undefined variable in expression: _velimit
11:47:02 File z\addons\dayz_server\init\server_functions.sqf, line 253

Edited by sanekxxz (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By BorizzK
      Давайте все что касается камер обсуждать в этой теме.
       
      Камеры бывают
      freedebugcamera
      dayzspectator
      staticcamera
       
      Взято из примера:
       
      Cоздание свободной камеры игроку (player - обьект игрока типа PlayerBase)
      GetGame().SelectSpectator(player.GetIdentity(), "freedebugcamera", player.GetPosition()); Уничтожение камеры c возвратом фокуса камеры обратно к персонажу
      PlayerBase pBody = player; GetGame().SelectPlayer(player.GetIdentity(), pBody);  
      Тут мне не ясен нюанс
      Зачем было загонять обьект игрока в переменную pBody и использовать эту переменную в SelectPlayer, когда проще
      GetGame().SelectPlayer(player.GetIdentity(), player);
       
      И еще хотелось бы понять
      как получить координаты положения камеры на сервере когда она  создана и переместилась
    • By Tamirlan
      Народ помогите! У меня проблема! В один момент все персонажи (игроки), когда залетают на остров одеты не в свою одежду и у всех в рюкзаках пустые пластиковые бутылки! не знаю вообще как это исправить! SOS! Есть подозрение что что то произошло с базой данных! но не уверен! Может кто сталкивался с такой проблемой? Как решали... не будьте равнодушными пожалуйста помогите... (началось с того что один из игроков покупал пластиковые бутылки и не заметил что купил слишком много что у него они стали вываливаться и появляться на земле (в рюкзаке место закончилось)) в момент покупки бутылок говорит что что то на секунду подвисло и после этого все кто залетает в игру стали появляться в его одежде и с бутылками. Это было вчера. Сегодня кто то купил одежду сантаклауса и теперь все появляются в одежде санты. Причем если корректно  выйти из миссии и после зайти на последнюю точку подключения все ок. А если выбрать любой город то все как я описывал выше. Плиз помогите решить этот полтергейст!) 
    • By Sovest2
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

      Подготовка
      Для начала нам понадобится подключить кастомный player_death.sqf в compiles.sqf
      Делается это следующим образом:
      В compiles.sqf заменить строку 
      player_death = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf"; на
      player_death = compile preprocessFileLineNumbers "*ВАШ ПУТЬ*\player_death.sqf";  
      Если у вас стоит инфистар,то необходимо заменить строку в AH.sqf
      _death = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_death.sqf'; на
      _death = compile preprocessFileLineNumbers '*ВАШ ПУТЬ*\player_death.sqf';  
      В вашем кастомном player_death.sqf необходимо заменить 
      _array = _this; if (count _array > 0) then { _source = _array select 0; _method = _array select 1; if ((!isNull _source) && (_source != player)) then { _canHitFree = player getVariable ["freeTarget",false]; _isBandit = (player getVariable["humanity",0]) <= -2000; _punishment = _canHitFree || _isBandit; //if u are bandit || start first - player will not recieve humanity drop _humanityHit = 0; if (!_punishment) then { //i'm "not guilty" - kill me && be punished _myKills = ((player getVariable ["humanKills",0]) / 30) * 1000; _humanityHit = -(2000 - _myKills); _kills = _source getVariable ["humanKills",0]; _source setVariable ["humanKills",(_kills + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; } else { //i'm "guilty" - kill me as bandit _killsV = _source getVariable ["banditKills",0]; _source setVariable ["banditKills",(_killsV + 1),true]; }; }; _body setVariable ["deathType",_method,true]; }; на
      _array = _this; if (count _array > 0) then { _source = _array select 0; _method = _array select 1; if ((!isNull _source) && (_source != player)) then { [player,_source]execVM "*ВАШ ПУТЬ*\humanityChange.sqf"; [player,_source]execVM "*ВАШ ПУТЬ*\kill_msg_send.sqf"; }; _body setVariable ["deathType",_method,true]; }; Отображение ника убийцы(Kill message)
       
      Создаем файл и закидываем в миссию файл kill_msg_send.sqf
      С содержанием
      private ["_victim","_killer","_vehicle","_weapon","_pic"]; _victim = _this select 0; _killer = _this select 1; _killerName = name _killer; _victimName = name _victim; _vehicle = typeOf (vehicle _killer); _weapon = currentWeapon _killer; if ((getText (configFile >> "CfgVehicles" >> _vehicle >> "vehicleClass")) in ["CarW","Car","CarD","Armored","Ship","Support","Air","ArmouredW","ArmouredD","SupportWoodland_ACR","AllVehicles"]) then { _pic = gettext(configFile >> 'CfgVehicles' >> _vehicle >> 'picture'); } else { _pic = gettext(configFile >> 'cfgWeapons' >> _weapon >> 'picture'); }; _kill_txt = format ["<t align='left' size='0.5'>%1 </t>",_victimName]; _kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%1'/>",_pic]; _kill_txt = _kill_txt + format ["<t align='left' size='0.5'> %1 </t>",_killerName]; PVDZE_send = [player,"kill_message",[_kill_txt]]; publicVariableServer "PVDZE_send";  
      Далее,нам необходимо отредактировать файл server_sendToClient.sqf ,которой находится в директории сервера
      И добавить после
      case "tagFriendly": { PVDZE_plr_FriendRQ = _arraytosend; _owner publicVariableClient "PVDZE_plr_FriendRQ"; }; Это
      case "kill_message": { custom_kill_message_show = _arraytosend; publicVariable "custom_kill_message_show"; }; Теперь необходимо создать файл kill_msg_show.sqf в папке с вашей миссией
      с содержимым
      private ["_pos","_i"]; arr_kill = ["","","","","",""]; fnc_kill_message = { private ["_finaltxt"]; _finaltxt = _this select 0; for[{_i = 0},{(_i<6)},{_i = _i +1}] do { if((arr_kill select _i) == "") then { arr_kill set [_i,_finaltxt]; [_i] execVM "*ВАШ ПУТЬ*\kill_msg_delete.sqf"; _i = count(arr_kill); }; }; }; "custom_kill_message_show" addPublicVariableEventHandler {(_this select 1) call fnc_kill_message;}; while {true} do { _pos = 0.01; _layout = 1001; { [_x,[safezoneX + 0.01 * safezoneW,2.0],[safezoneY + _pos * safezoneH,0.3],5,0.5,0,_layout] spawn BIS_fnc_dynamicText; _pos = _pos + 0.021; _layout = _layout + 1; } ForEach arr_kill; sleep 1; }; Создать файл kill_msg_delete.sqf с 
      private["_pos"]; _pos = _this select 0; sleep 10; arr_kill set [_pos,""];  
      И вставить в init.sqf после строки
      _playerMonitor = [] execVM "custom\player_monitor.sqf"; строку
      execVM "*ВАШ ПУТЬ*\kill_msg_show.sqf"; Осталось только добавить
      custom_kill_message_show В первую строку файла publicvariable.txt
       
      Все,отображение ника убийцы готово!
       
       
      Изменение человечности за убийство Бандита\Героя
      создать файл humanityChange.sqf с содержимым
      private ["_victim","_killer","_myKills","_humanity","_killerHumanity","_isKillerBandit","_isBandit","_humanityHit","_kills","_killerGunner"]; _victim = _this select 0; _killer = _this select 1; _humanity = _victim getVariable["humanity",0]; _killerHumanity = _killer getVariable["humanity",0]; _isKillerBandit = (_killerHumanity) < 0 ; _isBandit = (_humanity) < 0; _humanityHit = 0; _myKills = 0; _killerVehicle = vehicle _killer; if(((!_isBandit) && _isKillerBandit) || (_isBandit && (!_isKillerBandit))) then { _myKills = round((_humanity) / 10); }; if(!_isBandit) then { _myKills = (_myKills + 200); _kills = _killer getVariable ["humanKills",0]; _killer setVariable ["humanKills",(_kills + 1),true]; } else { _myKills = (_myKills - 200); _kills = _killer getVariable ["banditKills",0]; _killer setVariable ["banditKills",(_kills + 1),true]; }; _killerGunner = gunner _killerVehicle; if(!isNil"_sourceGunner") then { _killer = _killerGunner; }; _humanityHit = _myKills * (-1); PVDZE_send = [_killer,"Humanity",[_killer,_humanityHit,300]]; publicVariableServer "PVDZE_send"; Изменение Человечности готово!
       
      Плюсы Всего этого:
      Отображение ника убийцы теперь работает всегда и корректно.(Если убивают с техники или с одного выстрела).
    • By snacksize
      Добрый вечер, мб кто сталкивался с такой проблемой Установил SnapProP4LVector Не работает улучшение у админов.К примеру ставлю стенку , хочу улучшить, а с меня требуют ресурсы. Хотя в первый запуск работало все в один клик и не нужны были ресурсы

      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
    • By dima3659
      Доброе время суток.Подскажите как можно аккуратно  и правильно убрать с карты все трейд зоны и торговцев 
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.