Posted: . At: 11:52 AM. This was 5 years ago. Post ID: 13032
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



How to protect your base in Arma 3 from trolls and griefing.


This very useful script when placed in the initPlayerLocal.sqf file will protect a base from придурки who are firing into your base and destroying everything.

player addEventHandler ["FiredMan", {
 
	_p = _this select 6;
	if(
		_p distance (getMarkerPos "respawn_west") < 1000) then {
			deleteVehicle _p;
	} else {
		_p spawn {
			waitUntil {
				if(
					_this distance (getMarkerPos "respawn_west") < 1000 )then {
 
						deleteVehicle _this;
 
				};
				if ( isNull _this ) exitWith { true };
				false
			};
		};
	};
 
}];

This script just deletes the rounds as they get close to your base, this means that they cannot destroy your base and wreck everything.

Here is another example, place an invisible marker named “safezone” and then put this code in initPlayerLocal.sqf.

player addEventHandler ["FiredMan", {
 
	_p = _this select 6;
	if(
		_p distance (getMarkerPos "safezone") < 1100) then {
			deleteVehicle _p;
	} else {
		_p spawn {
			waitUntil {
				if(
					_this distance (getMarkerPos "safezone") < 1100 )then {
 
						deleteVehicle _this;
 
				};
				if ( isNull _this ) exitWith { true };
				false
			};
		};
	};
 
}];

Yet another variant. This is hardcoding the position of an object to define the center of the base, this prevents malicious players moving the marker with scripting to allow them to destroy your base again.

player addEventHandler ["FiredMan", {
 
	_p = _this select 6;
	if(
		_p distance [11931.5,2311.61] < 1100) then {
			deleteVehicle _p;
	} else {
		_p spawn {
			waitUntil {
				if(
					_this distance [11931.5,2311.61] < 1100 )then {
 
						deleteVehicle _this;
 
				};
				if ( isNull _this ) exitWith { true };
				false
			};
		};
	};
 
}];

This very useful script should help you out when trying to protect your base from trolls. You do not need to print a warning, just silently protect your base and stop griefing and trolling before it takes hold.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.