Jump to content

Donnovan

Member
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by Donnovan

  1. I would like to add this to my server  but

    but Where do I put the safezone coords ???

     

    You don't need to mess with safe coordinates, it will use the game build in trader sensors/coordinates.

     

    If you want safezone in Air Craft Dealer, this sensor/coordinate need to be created since its not exist by default.

    I can help you in anything.

  2. Rai!

    Often i have people on my server asking me why they can't remove their plot pole.

    The case is that they lost so many crowbars and/or toolbox broken in the process that they start to think that there is something wrong. I feel like then.

    So i would like to ask you. This is normal? It's working as intended? Or it's any king of problem my server is having?

    Thankyou in advance!

  3. If you like my work, please consider a donation:

    btn_donate_LG.gif $USD

    btn_donate_LG.gif $EURO

    *** UPDATED WITH A MAJOR BUG FIX IN THE DATE 2014-10-06 1:10 PM

    *** This update will fix the Repair Vehicle working always in all cases

    *** without the need of vehicle parts, wheell, glass, motor or tools

    *** for vehicles that entered the safezone.

    *** The only file that change is the file safezone.sqf.

    Rai!

    Gebriel

    angelwithsword_zps2fb55b02.jpg

    We, from Clodovil BR Server, are proud to present you, the Gebriel Safe Zones. (safe as heaven).

    SAFEZONES?

    Safezones are excluding areas where peace must be maintained or, sadly, forced.

    WHAT MOST SAFE PREVENTS

    Cant kill other players

    Cant destroy vehicles

    Cant access any gear for any player/vehicle

    WHAT GEBRIEL PREVENTS

    Cant kill other players

    Cant destroy vehicles

    Can't mess with any player gear

    Can't mess with vehicles you does not have ownerity

    Can't mess with gear of vehicles you does not have ownerity

    VEHICLE OWNERITY?

    Is when you have acess to a vehicle inside a safe zone, you have access to the vehicle and to the vehicle gear.

    HOW TO HAVE VEHICLE OWNERITY IN THE SAFE ZONE?

    You must enter the safe zone inside the vehicle.

    If a group of 10 people is on a truck and this truck enters the safe zone, those 10 players will have access to the truck and to the truck gear. No more players will have access to it.

    HOW TO REMOVE VEHICLE OWNERITY?

    You must try to invade the vehicle you does not have ownerity. After the first invasion try, a 8 minutes counter will start, and when the counter reachs zero the vehicle will loose it ownerity and will be avaliable to all players, until someone enters again in the safe with it.

    HOW TO STOP THE 8 MINUTOS COUNTER?

    One or more of the vehicle owners need to re-enters in the safe with the vehicle.

    WHAT ABOUT VEHICLES THAT ON SERVER START ARE IN THE SAFE ZONES?

    They don't have ownerity and don't have god mode. But if a player re-enters with it in the safe zone, he will gain ownerity over it.

    NOTE

    Vehicle ownerity is something that only exists inside safe zones.

    {[THE CODE]} {[THE CODE]} {[THE CODE]}

    1) INIT.SQF

    At the end of your init.sqf file, add this code:

    if (!isServer) then {
    	//Gebriel Safe
    	[] execVM "custom\safezone.sqf";	
    };
    
    2) [MISSION FOLDER]\CUSTOM\SAFEZONE.SQF

    This bellow is the main script, it's called from the init.sqf file.

    Create a new text file, put this code bellow in it, rename the text file to safezone.sqf and put it in your [mission folder]\custom\ folder (create this folder if necessary).

    Thanks for Maca134 for the Custom Remote Messages Script:

    //Gebriel Safezones
    //By Donnovan from Brazil
    don_incar = 0;
    don_firedEH_1 = nil;
    don_godon_1 = 0;
    inSafeZone = false;
    [] spawn {
    	private ["_runOneTime","_canbuild","_don_passengers","_don_veh_crew","_don_player_veh","_don_veh_driver"];
    	waitUntil {!(isNil "canbuild")};
    	_runOneTime = false;
    	_canbuild = canbuild;
    	while {true} do {
    		waitUntil {!((_canbuild && canbuild) || (!_canbuild && !canbuild)) || !_runOneTime};
    		_canbuild = canbuild;
    		if (!canbuild) then {
    			player_zombieCheck = {};
    			fnc_usec_damageHandler = {};
    			fnc_usec_unconscious  = {};
    			player allowDamage false;
    			player removeAllEventHandlers "handleDamage"; don_godon_1 = 1; inSafeZone = true; sleep 0.025;
    			[] spawn {
    				private ["_myHdEh"];
    				while {!canbuild} do {
    					_myHdEh = player addEventHandler ["handleDamage", {0}];
    					sleep 0.02;
    					player removeEventHandler ["handleDamage",_myHdEh];
    				};
    			};
    			if (isNil "don_firedEH_1") then {
    				don_firedEH_1 = 0; sleep 0.025;
    				don_firedEH_1 = player addEventHandler ["Fired",{
    					cutText ["Can't fire with godon.","PLAIN DOWN", 2];
    					deleteVehicle (_this select 6);
    				}];
    			};
    		};
    		if (canbuild && _runOneTime) then {
    			[] spawn {
    				for "_x" from 1 to 30 do {
    					if (_x >= 6) then {cutText [format ["%1 seconds to godoff and shoton.", 31-_x], "PLAIN DOWN"];};
    					sleep 1;
    					if (!canbuild) exitWith {};
    					if (_x == 30) then {
    						cutText ["Godoff and Shoton!", "PLAIN DOWN"];
    						player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
    						fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
    						fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
    						player allowDamage true;
    						player removeAllEventHandlers "handleDamage";
    						player addEventHandler ["handleDamage", {_this call fnc_usec_damageHandler;}];
    						player removeEventHandler ["Fired", don_firedEH_1]; don_firedEH_1 = nil;
    						don_godon_1 = 0; inSafeZone = false;
    					};
    				};
    			};
    		};
    		if (!canbuild && don_incar == 1) then {
    			_don_player_veh = don_player_veh; don_veh_crew = crew _don_player_veh; _don_veh_driver = driver _don_player_veh;
    			_don_player_veh allowDamage false;
    			_don_player_veh removeAllEventHandlers "handleDamage";
    			_don_player_veh addEventHandler ["handleDamage", {0}];
    			_don_player_veh removeAllEventHandlers "Fired";
    			_don_player_veh addEventHandler ["Fired",{deleteVehicle (_this select 6);}];			
    			//PASSENGERS NAMES
    			_don_passengers = ""; {if (Alive _x) then {_don_passengers = _don_passengers + format [" %1",name _x];};} forEach don_veh_crew;
    			_don_veh_crew = []; {if (Alive _x) then {_don_veh_crew = _don_veh_crew + [getPlayerUID _x];};} forEach don_veh_crew;
    			//ASSING OWNERS
    			if (player == _don_veh_driver) then {
    				_don_player_veh setVariable ["don_ownerity_code", format ["%1_%2", getPlayerUID player, round diag_tickTime], true];
    				_don_player_veh setVariable ["don_crew", _don_veh_crew, true]; //CHANGE
    				_don_player_veh setVariable ["don_passengers", _don_passengers, true];
    			};
    		};
    		if (canbuild && don_incar == 1) then {
    			_don_player_veh = don_player_veh; _don_veh_driver = driver _don_player_veh;			
    			[_don_player_veh] spawn {
    				for "_x" from 1 to 15 do {
    					sleep 1;
    					if (!canbuild) exitWith {};
    					if (_x == 15) then {
    						(_this select 0) allowDamage true;
    						(_this select 0) removeAllEventHandlers "handleDamage";
    						(_this select 0) addEventHandler ["handleDamage", {_this call vehicle_handleDamage;}];
    						(_this select 0) removeAllEventHandlers "Fired";
    					};
    				};	
    			};
    			//DISASSING OWNERS
    			if (player == _don_veh_driver) then {
    				_don_player_veh setVariable ["don_ownerity_code", nil, true];
    				_don_player_veh setVariable ["don_crew", nil, true];
    				_don_player_veh setVariable ["don_passengers", nil, true];
    			};
    		};
    		_runOneTime = true;
    	};
    };
    [] spawn {
    	private ["_don_veh_crew","_wait_time","_last_mark","_max_time"];
    	while {true} do {
    		_max_time = 480;
    		waitUntil {sleep 0.0625; vehicle player != player};
    		don_player_veh = vehicle player;
    		don_incar = 1;
    		if (!canbuild) then {
    			//VEHICLE OWNERITY CHECK
    			_don_veh_crew = don_player_veh getVariable ["don_crew", nil]; if (isNil "_don_veh_crew") then {_don_veh_crew = [getPlayerUID player];};
    			if !(getPlayerUID player in _don_veh_crew) then {
    				call compile format ['if (isNil "don_%1") then {don_%1 = diag_tickTime;}; _last_mark = don_%1;', don_player_veh getVariable ["don_ownerity_code", 0]];
    				_wait_time = diag_tickTime - _last_mark;
    				if (_wait_time < _max_time) then {
    					player action ["getOut", don_player_veh];
    					[objNull, player, rSAY, "error1"] call RE;
    					cuttext [format ["Owners:%1. %2 seconds to liberate.", don_player_veh getVariable ["don_passengers","Owners not found"], round (_max_time - _wait_time)], "PLAIN DOWN"];
    					cad_pvar_smessage = [format ["%1 is messing with your vehicle! %2 seconds to liberate!", name player, round (_max_time - _wait_time)], _don_veh_crew];
    					publicVariable "cad_pvar_smessage";
    				} else {
    					call compile format ['don_%1 = nil;', don_player_veh getVariable ["don_ownerity_code", 0]];
    					//DISASSING OWNERS
    					don_player_veh setVariable ["don_ownerity_code", nil, true];
    					don_player_veh setVariable ["don_crew", nil, true];
    					don_player_veh setVariable ["don_passengers", nil, true];
    					cuttext [format ["Vehicle is now free for all!"], "PLAIN DOWN"];
    					cad_pvar_smessage = [format ["One of your safe vehicle is now free and player %1 is in it!", name player], _don_veh_crew];
    					publicVariable "cad_pvar_smessage";
    				};
    			};
    			don_player_veh allowDamage false;
    			don_player_veh removeAllEventHandlers "handleDamage";
    			don_player_veh addEventHandler ["handleDamage", {0}];
    			don_player_veh removeAllEventHandlers "Fired";
    			don_player_veh addEventHandler ["Fired",{deleteVehicle (_this select 6);}];
    		};
    		if (canbuild) then {
    			don_player_veh allowDamage true;
    			don_player_veh removeAllEventHandlers "handleDamage";
    			don_player_veh addEventHandler ["handleDamage", {_this call vehicle_handleDamage;}];
    			don_player_veh removeAllEventHandlers "Fired";
    			//DISASSING OWNERS
    			if (player == driver don_player_veh) then {
    				don_player_veh setVariable ["don_ownerity_code", nil, true];
    				don_player_veh setVariable ["don_crew", nil, true];
    				don_player_veh setVariable ["don_passengers", nil, true];
    			};
    		};
    		waitUntil {sleep 0.0625; vehicle player == player};
    		don_incar = 0;
    		don_player_veh = nil;
    	};
    };
    //Thanks Maca for the Remote Message idea
    "cad_pvar_smessage" addPublicVariableEventHandler {
    	private ["_message", "_receivers"];
    	_message = (_this select 1) select 0; _receivers = (_this select 1) select 1;
    	if (getPlayerUID player in _receivers) then {cutText [_message, "PLAIN DOWN"];};
    };
    3) [MISSION FOLDER]\DAYZ_CODE\COMPILE\FN_GEARMENUCHECKS.SQF

    This code bellow goes at the end of your custom dayz_code\compile\fn_gearMenuChecks.sqf.

    Thanks for Maca134 for the no-player-gear-acess-in-safe script.

    To have a custom dayz_code\compile\fn_gearMenuChecks.sqf file you will need a custom dayz_code\init\compiles.sqf, since the first is called in game by the second, so you need a custom compiles.sqf that calls your custom fn_gearMenuChecks.sqf file, and since compiles.sqf is now custom, you need to change the call in init.sqf to it, since compiles.sqf is called in-game by init.sqf.

    More on that later! Sorry for now! If you have any doubt, please ask!

    //Prevents players opening others backpacks MACA123
    if (isNil "inSafeZone") then {inSafeZone = false;};
    if ((!canbuild || inSafeZone) and _cTarget isKindOf "Man" and alive _cTarget and (((vehicle player) distance _cTarget) < 12)) then {
    	cutText ["Cannot access other players gear in the safezone." , "PLAIN DOWN"];
    	_display closeDisplay 1;
    };
    
    //Gebriel Safezones
    //by Donnovan from Brazil
    if (!canbuild) then {
    	private ["_don_iscar","_don_ismycar","_don_crew"];
    	_don_iscar = false; _don_ismycar = false;
    	if (_cTarget isKindOf "LandVehicle" || _cTarget isKindOf "Air" || _cTarget isKindOf "Ship" ) then {
    		_don_crew = _cTarget getVariable ["don_crew", nil]; if (isNil "_don_crew") then {_don_crew = [getPlayerUID player];};
    		_don_iscar = true; if ((getPlayerUID player) in _don_crew) then {_don_ismycar = true;};
    	};
    	if (_don_iscar && !_don_ismycar) then {
    		[objNull, player, rSAY, "error1"] call RE;
    		cutText ["You can't access this vehicle gear!" , "PLAIN DOWN"];
    		_display closeDisplay 1;
    	};
    };
    4) ERROR1.OGG

    The scipt have a sound file, download it on this link and put the file at the root of your mission folder: http://s000.tinyupload.com/index.php?file_id=69305942403778252911

    Add the sound declaration in description.ext. Here is my description.ext:

    //DONN sounds
    class CfgSounds {
        sounds[] = {error1};
    	class error1 {
    		name="error1";
    		sound[]={error1.ogg,1,1};
    		titles[] = {};
       };
    };
    You could have more custom sounds on class CfgSounds, if so you need to acomodate then together.

    This bellow is a example where the Gebriel Safezones error1.ogg sound coexists with another 2 custom sounds (diescream.ogg and caloideploy.ogg):

    //DONN sounds
    class CfgSounds
    {
        sounds[] = {dieScream,caloideploy,error1};
            class dieScream {
    		name="dieScream";
    		sound[]={diescream.ogg,1,1};
    		titles[] = {};
        };
    	class caloideploy {
    		name="caloideploy";
    		sound[]={deploys\bike\caloi_deploy.ogg,1,1};
    		titles[] = {};
        };
    	class error1 {
    		name="error1";
    		sound[]={error1.ogg,1,1};
    		titles[] = {};
       };
    };
    5) BATTLEYE FILTERS

    On the BE filter publicvariable.txt, search for the line that starts with 5 "". At the end of this line add a space and after the space add !"cad_pvar_s".

  4. If you already added a grass cutter in your custom map, can you help-me to add one to my map?

    What i already know:

    It's name is ClutterCutter. Thanks a lot for every single person that told-me that in the 4 foruns i asked! REALLY! I know that more than ever now!

    I also was able to find this http://browser.six-projects.net/cfg_vehicles/1675956.

    I don't know anything else, still not able to add the grass cutter, and feels like giving up trying to do this.

    If you can kindly explain me how to add a ClutterCutter in my map, a explain for a complete lame person, i will apreciate it very much!

    Thankyou in advance!

    And sorry for my lameness.

  5. Anyone that know how to do disconnect dupe can try to do it on this server?

    191.190.13.107:2302

    Herbert, a friend of mine, had an idea for a anti-dupe. I tried to implement it.

    Herbert is away, so he can't test it by now.

    If anyone can help, trying to do the disconnect dupe on this server, i apreciate.

    Thankyou!

    The server greetings image:

    intro_zps190678ac.jpg

  6. Hi,

    I'm trying to sync server diag_tickTime with cliente diag_tickTime, so i need to send "one to another" or "another to one" to sync then, and correct the error, that is, the ping at the moment of transmition.

    This correction is not exact, but i believe it will, in most cases, lower the error.

    But for this i need to know the client ping. There is any function that give, in a .sqf script, the player ping?

    Thankyou in advance!

  7. CUSTOM STATISTIC YOU ALSO CAN HAVE:

    Player "NEARNESS": Write to the MySql database each time a player is less than 50 meters away from another. When the players are on the same vehicle, the distance will be show as 0 meters.

    The "usefulness" of this is already in search (lol), but i already got some very nice info from that:

    - You know players are friends, because they are always near each other.

    - You know players that have spoted other players, because they was near for a small amount of time.

    - You have all that stored in the database, so you can do a timeline of "nearness".

    But, this above is just the first Unseen Statistcs test.

    The most obvious statistics will be allways there:

    - PvP kills (server_playerDie.sqf).

    - All Buys on Traders (server_traderObj.sqf).

    - All Sells on Traders (server_traderObj.sqf).

    - All PvP weapon hits (fnc_plyrHit.sqf).

    Everything with player name and id.

    NEXT STEP:

    The web site to show it.

  8. It's working!

    I'm just thinking in the way to release it...

    1) Stand alone: Pretty independent.

    -BATTLEYE FILTERS: Change in BE filters to allow new public event handler.

    -NEW FILES PLACEMENT: New directory DONN inside server pbo file.

    -FILES CHANGED: New line at the end of server file init\server_functions.sqf

    or...

    2) Invasive: More right to the point.

    -BATTLEYE FILTERS: none.

    -NEW FILES PLACEMENT: none.

    -FILES CHANGED: Replace 3 files (server_playerDie.sqf, server_traderObj.sqf, fnc_plyrHit.sqf) on the server pbo file.

    Also there is another steps connon to the two instalation ways:

    - Create the @Arma2NET directory inside your Arma2 OA directory (this folder is downloaded from the Arma2NET MySql project)*.

    - Add the @Arma2NET mod to your server launcher bat.

    - Install the MySql NET Conector 6.7.5**.

    - Run a SQL file in your MySql database (like you have run epoch.sql for the Epoch Server) to create the dayz_epoch_stats database where the stats will be placed.

    * Arma2NET and Arma2NET MySql are different things. The first is the pure Arma2NET with some default function like server time function to make the server computer time acessible by the game .sqf scripts or command line function to make the game execute a comand line, like a bat file, from the .sqf scripts. And Arma2NET MySql is all this plus the abillity to execute any SQL statement from the game .sqf scripts. The two projects provide a mod folder for you with the name @Arma2NET.

    ** you may need to unistall newer version if you have it, 6.8.3 for example, because the last compiled Arma2NET MySql files was compiled for 6.7.x version of NET Conector.

    This all seens complicated, but is rather simple.

  9. Guys!

     

    This above is geting old.

     

    Right now we are experimenting with Arma2NET and MySQL for Arma2NET so we can trow statistic directly from the game to the MySQL database (thanks Herbert for the find).

     

    One of the last detected problem happens because we mess with multiplayer public event handlers and this is kicking the player from the game with MPEventhandler Restriction #0 message!

     

    I'm not sure how to avoid this kick since i never really had understand the BE filters.

     

    Soon, i will post here asking for help.

    Update: Problem with BE Filters Fixed! Allowed my custom multiplayer public event handler in MPEventhandlers.txt, publicvariables.txt, publicvariablesval.txt and remoteexec.txt!

×
×
  • Create New...