BetterDeadThanZed
Valued Member!
can infistar be blocking it?
I have "check actions" disabled in Infistar.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
can infistar be blocking it?
//this initialized the selfactions handle. This should be in your variables.sqf
s_player_drinkWater = -1;
//these two lines were required to find the _pond and _well words in the found objects. These I copied out of the compiles.sqf so they are surely correct (I changed the locations to the local folder)
fnc_param = compile preprocessFileLineNumbers "fn_param.sqf";
fnc_inString = compile preprocessFileLineNumbers "fn_inString.sqf";
//this is my selfactions file
execvm "selfactions.sqf";
private["_playerPos","_canDrink","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_display"];
while {true} do{
_playerPos = getPosATL player;
_canDrink = count nearestObjects [_playerPos, ["Land_pumpa","Land_water_tank"], 4] > 0;
_isPond = false;
_isWell = false;
_pondPos = [];
_objectsWell = [];
if (!_canDrink) then {
_objectsWell = nearestObjects [_playerPos, [], 4];
{
//Check for Well
_isWell = ["_well",str(_x),false] call fnc_inString;
if (_isWell) then {_canDrink = true};
} forEach _objectsWell;
};
if (!_canDrink) then {
_objectsPond = nearestObjects [_playerPos, [], 50];
{
//Check for pond
_isPond = ["pond",str(_x),false] call fnc_inString;
if (_isPond) then {
_pondPos = (_x worldToModel _playerPos) select 2;
if (_pondPos < 0) then {
_canDrink = true;
};
};
} forEach _objectsPond;
};
if (_canDrink) then {
if (s_player_drinkWater < 0) then {
s_player_drinkWater = player addaction[("Drink"),"drink_water.sqf"];
};
} else {
player removeAction s_player_drinkWater;
s_player_drinkWater = -1;
};
sleep 2;
};