Jump to content

I want to share the apocalypse with this guy :O


juandayz

Recommended Posts

  • 2 weeks later...

yup i found it one day.. and in the same day i see every video in his channel... its amazing... cuz he dont say anything just build.

 

i take a idea to find clay near of lakes..to craft bricks.. now im writing the code :laugh:

Spoiler

notify = false;
_haspickaxe =  false;

while {true} do {

private["_pos","_canextractclay","_isPond","_pondPos","_objectsPond","_haspickaxe","_haspickaxeinventory","_inventory"]; 



  
_pos = getPosATL player;  


_canextractclay = count nearestObjects [_pos, ["Land_pumpa","Land_water_tank"], 4] > 0;
_isPond = false;
_pondPos = [];


 

 

//////////////////////////////////////////////////
// Checks
if (!_canextractclay) then {
	_objectsPond = nearestObjects [_pos, [], 50];
	{
		//Check for pond
		_isPond = ["pond",str(_x),false] call fnc_inString;	
		
		if (_isPond) then {	
			_pondPos = (_x worldToModel _pos) select 2;
			if (_pondPos < 0) then {
				_canextractclay = true;
			};
		};
	} forEach _objectsPond;
};

if  (_canextractclay) then {
		if (!notify) then {
			systemChat("Use scroll menu to extract some clay");
			notify = true;
		};
	} else { notify = false; };
	
	
if (_canextractclay) then {

_inventory = items player;
_haspickaxeinventory = "ItemPickaxe" in _inventory;

if !(_haspickaxeinventory) then {
systemChat("Extract Clay area you need a pickaxe in your toolbelt");
_haspickaxe =  false;
sleep 20;
}else{
_haspickaxe= true;
};

if (_haspickaxe) then {


if (s_player_clay < 0) then {
s_player_clay = player addaction [("<t color=""#C0A172"">" + ("Extract Clay") +"</t>"),"custom\portables\extractclay.sqf","",5,false,true,"",""]; };	
} else {
		player removeAction s_player_clay;
		s_player_clay = -1;		
	};
	sleep 2;
};
};

 

Link to comment
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
  • Discord

×
×
  • Create New...