Why hello there.
I tried to make a refuel target script, using a "Repair Area" script and editing the target from area to "cursorTarget".
Meh, never as easy at it would seem. So that doesn't work....
Anyone got a script I could have for the menu? It's not a public menu, but if it is ever public, I will credit you.
LEACHING* the titel say it all
[infiSTAR Repair+Refuel Script]
22:23 26/09/12 UTC+1, Germany
v1.0
What does this Script do?
Using WUAT or Silent Menu,
choosing a player and executing the script on him, will repair and refuel his vehicle (if he is sitting in it).
YOU CAN CHANGE fuelQuantity = xxxx; (this is the amount of fuel what's added to the vehicle)
*/
_plr = _this select 0;
_case = _this select 1;
_class = "";
private["_pList", "j", "i", "_pArray", "v", "_dir"];
_pList = playableUnits;
j = count _pList;
i = 0;
_pArray = [];
for "i" from 0 to j do
{
v= _pList select i;
if(format[name v] == _plr) then {
private["_vehicle","_curFuel","_newFuel"];
_vehicle = (vehicle v);
_vehicle setvehicleammo 1;
// REPAIR method 1
_hitpoints = _vehicle call vehicle_getHitpoints;
{
_selection = getText(configFile >> "cfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "name");
dayzSetFix = [_vehicle, _selection, 0];
publicVariable "dayzSetFix";
if (local _vehicle) then
{dayzSetFix call object_setFixServer;};} forEach _hitpoints;
// REPAIR method 2
dayzSetFix = (vehicle v) setdammage 0;
publicVariable "dayzSetFix";
if (local (vehicle v)) then {dayzSetFix call object_setFixServer;};
// REFUEL
fuelQuantity = 10000;
_canSize = fuelQuantity;
/* original path, to fuel canSize, which is a Quantity of 20.
_canSize = getNumber(configFile >> "cfgMagazines" >> "ItemJerrycan" >> "fuelQuantity");
*/
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
_capacity = getNumber(_configVeh >> "fuelCapacity");
_nameType = getText(_configVeh >> "displayName");
_nameType = (name v) + ("s ") + (_nameType) + (" repaired and");
_curFuel = ((fuel _vehicle) * _capacity);
_newFuel = (_curFuel + _canSize);
if (_newFuel > _capacity) then {_newFuel = _capacity};
_newFuel = (_newFuel / _capacity);
//[player,"refuel",0,false] call dayz_zombieSpeak;
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
sleep 0.5;
dayzSetFuel = [_vehicle,_newFuel];
dayzSetFuel spawn local_sefFuel;
publicVariable "dayzSetFuel";
cutText [format[localize "str_player_05",_nameType,_canSize], "PLAIN DOWN"];
sleep 0.5;
call fnc_usec_medic_removeActions;
r_action = false;
}
};
_plr = "";
//notes + reminder:
/*
_selection = 'motor';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
_selection = 'palivo';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
_selection = 'wheel_1_1_steering';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
_selection = 'wheel_1_2_steering';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
_selection = 'wheel_2_1_steering';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
_selection = 'wheel_2_2_steering';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
_selection = 'karoserie';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
_selection = 'karoserie';
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};
_vehicle setvelocity [0,0,1];
*/
9.11 ? More like 9._ _
Pluto is not a planet anymore!
That is my "Original Script" that I said does not work. It's from Wuat.