Audio Rejectz
Well-Known Member
I was wondering if someone could help me with this, please bare with me as im new to all this and im trying to learn.
I fancied try to add the ability to siphon fuel from vehicles, as it would make sense in a post apocalyptic world. After looking around i found this from DNK
addFuel.sqf
fuelcheck.sqf
misson.sqm
Now if i put the sqf's in my misson, it seems i am able to add the code above to my misson.sqm but i can only get it to apply to vehicles that are in there to, meaning there static. Is there anyway to get around this?
I fancied try to add the ability to siphon fuel from vehicles, as it would make sense in a post apocalyptic world. After looking around i found this from DNK
addFuel.sqf
Code:
_m = _this select 3;
_j = 0;
if (playergas > 0) then {
player playmove "AinvPknlMstpSnonWrflDnon_medic";
sleep 3;
player playmove "AinvPknlMstpSnonWrflDnon_medic2";
sleep 9;
player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd";
_j = ((fuel (_this select 0)) + (_m *((playergas/100)*0.1)));
(_this select 0) setfuel _j;
playergas = 0;
hint "Your cannister is now empty.";
} else {
hint "No gas in cannister.";
fuelcheck.sqf
Code:
fuel = round((fuel (vehicle player))*100);
hint format["Tank is %1pc full.",_fuel];
misson.sqm
Code:
init="this addaction [""Check fuel"",""fuelcheck.sqf"",14,0,false,true,"""",""true""]; this addaction [""siiphon fuel"", ""takefuel.sqf"",0.8,0,false,true,"""",""true""]; this addAction [""Add fuel"", ""addfuel.sqf"",0.8,0,false,true,"""",""true""];";
Now if i put the sqf's in my misson, it seems i am able to add the code above to my misson.sqm but i can only get it to apply to vehicles that are in there to, meaning there static. Is there anyway to get around this?