0.75 + 1.7.5.M1D21 with binaries and sql

This commit is contained in:
vbawol
2013-01-21 11:33:58 -06:00
parent 1cb4388089
commit bea64841eb
23 changed files with 226 additions and 98 deletions

View File

@@ -96,7 +96,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
//_part = player addAction [_Display, "\z\addons\dayz_code\actions\trade_cancel.sqf",[], 0, true, false, "",""];
//_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""];
} else {
_Display = format["Buy %1 for %2 %3 (Available: %4)", _textPart, _in, _textCurrency, _qty];
_Display = format["Buy %1 (%2) for %3 %4 (Available: %5)", _textPart, _name, _in, _textCurrency, _qty];
_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""];
};

View File

@@ -8,15 +8,7 @@ _config = configFile >> "CfgSurvival" >> "Meat" >> _type;
player removeAction s_player_butcher;
s_player_butcher = -1;
_hasChance = 9 > random 100;
if (_hasKnife) then {
if (_hasChance) then {
player removeWeapon "ItemKnife";
player addWeapon "ItemKnifeBlunt";
cutText [localize "STR_EQUIP_CODE_DESC_4", "PLAIN DOWN"];
};
};
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
//Get Animal Type

View File

@@ -2,21 +2,14 @@ private["_location","_isOk","_dir","_classname"];
private["_item"];
_item = _this;
call gear_ui_init;
_hasChance = 9 > random 100;
if (["forest",dayz_surfaceType] call fnc_inString) then {
if (!_hasChance) then {
_result = [player,"PartWoodPile"] call BIS_fnc_invAdd;
if (_result) then {
cutText [localize "str_player_25", "PLAIN DOWN"];
} else {
cutText [localize "str_player_24", "PLAIN DOWN"];
};
} else {
player removeWeapon "ItemHatchet";
player addWeapon "ItemBrokeHatchet";
cutText [localize "str_player_23", "PLAIN DOWN"];
}
} else {
cutText [localize "str_player_23", "PLAIN DOWN"];
};

View File

@@ -7,7 +7,7 @@ if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
if (vehicle player != player) exitWith {cutText ["You may not drink while in a vehicle", "PLAIN DOWN"]};
//Force players to wait 3 mins to drink again
if (dayz_lastDrink < 180) exitWith {cutText ["You may not drink, your not thirsty", "PLAIN DOWN"]};
//if (dayz_lastDrink < 180) exitWith {cutText ["You may not drink, your not thirsty", "PLAIN DOWN"]};
_item = _this;
_hasdrinkitem = _this in magazines player;

View File

@@ -6,7 +6,7 @@ if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
if (vehicle player != player) exitWith {cutText ["You may not eat while in a vehicle", "PLAIN DOWN"]};
//Force players to wait 3 mins to eat again
if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]};
//if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]};
_item = _this;
_hasfooditem = _this in magazines player;

View File

@@ -6,11 +6,9 @@ if ((_location select 2) < 0) then {
//_location set [2,0];
_isOk = true; //count (_location isFlatEmpty [0.3,0,0,4,0,false,player]) > 0;
_hasWood = "PartWoodPile" in magazines player;
_hasChance = 9 > random 100;
if (_hasWood) then {
if (_isOk) then {
if (!_hasChance) then {
player removeMagazine "PartWoodPile";
_dir = getDir player;
_classname = "Land_Fire_DZ";
@@ -23,11 +21,6 @@ if (_hasWood) then {
_id = _fire spawn player_fireMonitor;
cutText [localize "str_fireplace_01", "PLAIN DOWN"];
} else {
player removeWeapon "ItemMatchbox";
player addWeapon "ItemMatchboxEmpty";
cutText [localize "Your box of matches appear to be empty", "PLAIN DOWN"];
};
} else {
cutText [localize "str_fireplace_02", "PLAIN DOWN"];
};

View File

@@ -5,8 +5,8 @@ _action = _this select 2;
_caller removeAction _action;
_callerID = _caller getVariable ["characterID", "0"];
_targetID = _target getVariable ["characterID", "0"];
_callerID = _caller getVariable ["characterID", 0];
_targetID = _target getVariable ["characterID", 0];
if (_callerID != 0 && _targetID != 0) then {

View File

@@ -1,10 +1,12 @@
/*
_item spawn player_wearClothes;
TODO: female
Added Female skin changes - vbawol
*/
private["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_myModel","_humanity","_isBandit","_isHero","_itemNew","_model"];
private["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_myModel","_itemNew","_currentSex","_newSex","_model"];
_item = _this;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
@@ -16,70 +18,30 @@ if (!_hasclothesitem) exitWith {cutText [format[(localize "str_player_31"),_text
if (vehicle player != player) exitWith {cutText ["You may not change clothes while in a vehicle", "PLAIN DOWN"]};
_isFemale = ((typeOf player == "SurvivorW2_DZ")||(typeOf player == "BanditW1_DZ"));
if (_isFemale) exitWith {cutText ["Currently Female Characters cannot change to this skin. This will change in a future update.", "PLAIN DOWN"]};
// _isFemale = ((typeOf player == "SurvivorW2_DZ")||(typeOf player == "BanditW1_DZ"));
// if (_isFemale) exitWith {cutText ["Currently Female Characters cannot change to this skin. This will change in a future update.", "PLAIN DOWN"]};
private["_itemNew","_myModel","_humanity","_isBandit","_isHero"];
_myModel = (typeOf player);
//_humanity = player getVariable ["humanity",0];
//_isBandit = _humanity < -2000;
//_isHero = _humanity > 5000;
_itemNew = "Skin_" + _myModel;
if ( !(isClass(_config >> _itemNew)) ) then {
_itemNew = if (!_isFemale) then {"Skin_Survivor2_DZ"} else {"Skin_SurvivorW2_DZ"};
};
if ( (isClass(_config >> _itemNew)) ) then {
if ( (isClass(_config >> _item)) ) then {
// Current sex of player skin
_currentSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _itemNew >> "sex");
// Sex of new skin
_newSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "sex");
if(_currentSex == _newSex) then {
// Get model name from config
_model = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "playerModel");
if (_model != _myModel) then {
player removeMagazine _item;
player addMagazine _itemNew;
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
};
switch (_item) do {
case "Skin_Sniper1_DZ": {
_model = "Sniper1_DZ";
} else {
cutText ["You cannot wear a skin of the opposite sex.", "PLAIN DOWN"];
};
};
case "Skin_Camo1_DZ": {
_model = "Camo1_DZ";
};
case "Skin_Rocket_DZ": {
_model = "Rocket_DZ";
};
case "Skin_RU_Policeman_DZ": {
_model = "RU_Policeman_DZ";
};
case "Skin_Pilot_EP1_DZ": {
_model = "Pilot_EP1_DZ";
};
case "Skin_Haris_Press_EP1_DZ": {
_model = "Haris_Press_EP1_DZ";
};
case "Skin_Ins_Soldier_GL_DZ": {
_model = "Ins_Soldier_GL_DZ";
};
case "Skin_GUE_Commander_DZ": {
_model = "GUE_Commander_DZ";
};
case "Skin_Functionary1_EP1_DZ": {
_model = "Functionary1_EP1_DZ";
};
case "Skin_Priest_DZ": {
_model = "Priest_DZ";
};
case "Skin_Rocker2_DZ": {
_model = "Rocker2_DZ";
};
case "Skin_Soldier1_DZ": {
_model = "Soldier1_DZ";
};
case "Skin_Survivor2_DZ": {
_model = "Survivor2_DZ";
};
case "Skin_Bandit1_DZ": {
_model = "Bandit1_DZ";
};
case "Skin_Survivor3_DZ": {
_model = "Survivor3_DZ";
};
};
if (_model != _myModel) then {
player removeMagazine _item;
player addMagazine _itemNew;
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
};

View File

@@ -56,6 +56,9 @@ if (_qty >= _qty_in) then {
_location = getPosATL _veh;
_veh setVariable ["characterID",dayz_playerUID,true];
clearWeaponCargoGlobal _veh;
clearMagazineCargoGlobal _veh;
["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;

View File

@@ -56,6 +56,9 @@ if (_qty >= _qty_in) then {
_location = getPosATL _veh;
_veh setVariable ["characterID",dayz_playerUID,true];
clearWeaponCargoGlobal _veh;
clearMagazineCargoGlobal _veh;
["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;