tavi mission.sqf + fixes

This commit is contained in:
vbawol
2013-05-24 14:44:20 -05:00
parent 8139f3a490
commit 2903abd32e
7 changed files with 94 additions and 94 deletions

View File

@@ -136,7 +136,6 @@ if (_qty >= _qty_in) then {
_obj = _obj select 0;
//check to make sure vehicle has no more than 75% average tire damage
_hitpoints = _obj call vehicle_getHitpoints;
_okToSell = true;

View File

@@ -94,18 +94,18 @@ if (_qty >= _qty_in) then {
if(dayzTradeResult == "PASS") then {
if(_buy_o_sell == "buy") then {
for "_x" from 1 to _qty_in do {
player removeMagazine _part_in;
_num_removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
if(_num_removed == _qty_in) then {
removeBackpack player;
player addBackpack _part_out;
};
removeBackpack player;
player addBackpack _part_out;
} else {
// Sell
removeBackpack player;
for "_x" from 1 to _qty_out do {
player addMagazine _part_out;
};
removeBackpack player;
// player addBackpack _part_out;
};
};
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];

View File

@@ -112,8 +112,6 @@ if(!_cancel) then {
if(_removed == 1) then {
player removeMagazine _item;
//call dayz_forceSave;
_dir = round(direction player);

View File

@@ -34,19 +34,20 @@ while {r_doLoop} do {
r_doLoop = false;
if (_finished) then {
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
} else {
//dayzHumanity = [player,50];
[player,50] call player_humanityChange;
_num_removed = ([player,"ItemMorphine"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
} else {
//dayzHumanity = [player,50];
[player,50] call player_humanityChange;
};
//["usecMorphine",[_unit,player]] call broadcastRpcCallAll;
usecMorphine = [_unit,player];
publicVariable "usecMorphine";
};
player removeMagazine "ItemMorphine";
//["usecMorphine",[_unit,player]] call broadcastRpcCallAll;
usecMorphine = [_unit,player];
publicVariable "usecMorphine";
} else {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;

View File

@@ -8,23 +8,25 @@ _unit setVariable ["USEC_inPain", false, true];
call fnc_usec_medic_removeActions;
r_action = false;
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Gear";
};
_num_removed = ([player,"ItemPainkiller"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
} else {
//dayzHumanity = [player,20];
[player,20] call player_humanityChange;
};
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Gear";
};
player removeMagazine "ItemPainkiller";
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
} else {
//dayzHumanity = [player,20];
[player,20] call player_humanityChange;
};
sleep 1;
//clear the healed player's vision
//["usecPainK",[_unit,player]] call broadcastRpcCallAll;
sleep 1;
//clear the healed player's vision
//["usecPainK",[_unit,player]] call broadcastRpcCallAll;
usecPainK = [_unit,player];
publicVariable "usecPainK";
};

View File

@@ -41,16 +41,16 @@ if (_finished) then {
_unit setVariable["LastTransfusion",time,true];
_unit setVariable["USEC_lowBlood",false,true];
player removeMagazine "ItemBloodbag";
//disableSerialization;
//call dayz_forceSave;
//["usecTransfuse",[_unit,player]] call broadcastRpcCallAll;
usecTransfuse = [_unit,player];
publicVariable "usecTransfuse";
_num_removed = ([player,"ItemBloodbag"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {
//["usecTransfuse",[_unit,player]] call broadcastRpcCallAll;
usecTransfuse = [_unit,player];
publicVariable "usecTransfuse";
//dayzHumanity = [player,100];
[player,100] call player_humanityChange;
//dayzHumanity = [player,100];
[player,100] call player_humanityChange;
};
} else {
r_interrupt = false;
player switchMove "";