Jump to content

[release] 1.0.5.1 - Weapon Attachment Mod 1.1.0 - Remove/Add attachments to weapons


Recommended Posts

  On 7/18/2014 at 10:35 PM, redcloud78 said:

instead of calling from bottom of mission init

 

could i call from my custom compiles instead like so?

 

2icbocy.png

if they are at the end after all of the vanilla dayz stuff then that *"should** be okay. i notice you have some of the path changed, just make sure you rename all the relative paths in the scripts or else they wont be found

Link to comment
Share on other sites

sorry, my blind eyes!!!

 

// use the hint version of the weapon mod inventory? change to false if it conflicts with your debug monitor. */
DZE_WEAPON_MOD_USE_HINT_INVENTORY = false;

 

Is it possible to use right click for GPS only to scan players, vehicles and zombies around???

 

b_560_95_1.png

Link to comment
Share on other sites

This script is great.  Not only is it something that I've wanted and been waiting for, and it works great, but it's also a great replacement for my old right click option script!

 

 

Just one thing I noticed.  I tried to format my config.sqf similar to this: (but for custom building script)

 

 
  On 7/17/2014 at 6:42 AM, mudzereli said:

DZE_CLICK_ACTIONS = [

["ItemZombieParts","Smear Guts on you","[] execVM ""custom\walkamongstthedead\smear_guts.sqf"";","true"],
["ItemWaterbottle","Wash zombie guts","[] execVM ""custom\walkamongstthedead\usebottle.sqf"";","true"]
];

 

 

with brackets [] execVM and double quotes ""on each side"" of script path

Didn't work, in-game nothing would happen the first time I tried, and second time I tried it would say 'building already in progress' or something

 

I removed the brackets, so just execVM now, changed the double quotes back to single apostrophe 'on each side' and it worked!

 

Thank you!

Link to comment
Share on other sites

Would this work?

Its a simple buy scripts, used to be triggered via selfactions

 

  Reveal hidden contents

private["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut","_qty","_needed","_started","_finished","_animState","_isMedic","_abort","_removed","_tradeCounter","_total_trades","_humanityGain","_humanity""_mod","_old","_new","_upg","_selected","_message","_wait","_waited","_inventory","_muzzles"];

// [part_out,part_in, qty_out, qty_in,];
 
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;
 
//_activatingPlayer = getPlayerUID player;
_mod = "Suppressor";
_part_out = _mod;
_part_in = "ItemGoldBar";
_qty_out = 1;
_qty_in = 1;
// _buy_o_sell = (_this select 3) select 4;
_textPartIn = (_this select 3) select 5;
_textPartOut = (_this select 3) select 6;
//_traderID = (_this select 3) select 7;
 
_qty = {_x == _part_in} count magazines player;
 
// find total number of possible trades
_total_trades = floor (_qty / _qty_in);
 
if(_total_trades < 1) exitWith { 
_needed =  _qty_in - _qty;
cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"];
DZE_ActionInProgress = false;
};
 
_abort = false;
_tradeCounter = 0;
 
// trade all items
for "_x" from 1 to _total_trades do {
 
_removed = 0;
 
_tradeCounter = _tradeCounter + 1;
 
if(_total_trades == 1) then {
cutText [format[(localize "str_epoch_player_105"),_tradeCounter,_total_trades] , "PLAIN DOWN"];
} else {
cutText [format[(localize "str_epoch_player_187"),_tradeCounter,_total_trades] , "PLAIN DOWN"];
};
[1,1] call dayz_HungerThirst;
player playActionNow "PutDown";
 
sleep 0.1;
 
 
_qty = {_x == _part_in} count magazines player;
if (_qty >= _qty_in) then {
 
_removed = _removed + ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
if (_removed == _qty_in) then {
 
 
for "_x" from 1 to _qty_out do {
_inventory = player getVariable["WeaponModInventory",[]];
player setVariable ["WeaponModInventory",_inventory + [_mod],true];
 
};
 
cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
 
} else {
 
// Return items from botched trade.
for "_x" from 1 to _removed do {
player addMagazine _part_in;
};
_abort = true;
};
 
} else {
_needed =  _qty_in - _qty;
cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"];
};
 
sleep 1;
_abort = true;
if(_abort) exitWith {};
};
 
 

DZE_ActionInProgress = false;

Link to comment
Share on other sites

  On 7/25/2014 at 11:15 PM, Creep said:

Would this work?

Its a simple buy scripts, used to be triggered via selfactions

 

  Reveal hidden contents

private["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut","_qty","_needed","_started","_finished","_animState","_isMedic","_abort","_removed","_tradeCounter","_total_trades","_humanityGain","_humanity""_mod","_old","_new","_upg","_selected","_message","_wait","_waited","_inventory","_muzzles"];

// [part_out,part_in, qty_out, qty_in,];
 
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;
 
//_activatingPlayer = getPlayerUID player;
_mod = "Suppressor";
_part_out = _mod;
_part_in = "ItemGoldBar";
_qty_out = 1;
_qty_in = 1;
// _buy_o_sell = (_this select 3) select 4;
_textPartIn = (_this select 3) select 5;
_textPartOut = (_this select 3) select 6;
//_traderID = (_this select 3) select 7;
 
_qty = {_x == _part_in} count magazines player;
 
// find total number of possible trades
_total_trades = floor (_qty / _qty_in);
 
if(_total_trades < 1) exitWith { 
_needed =  _qty_in - _qty;
cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"];
DZE_ActionInProgress = false;
};
 
_abort = false;
_tradeCounter = 0;
 
// trade all items
for "_x" from 1 to _total_trades do {
 
_removed = 0;
 
_tradeCounter = _tradeCounter + 1;
 
if(_total_trades == 1) then {
cutText [format[(localize "str_epoch_player_105"),_tradeCounter,_total_trades] , "PLAIN DOWN"];
} else {
cutText [format[(localize "str_epoch_player_187"),_tradeCounter,_total_trades] , "PLAIN DOWN"];
};
[1,1] call dayz_HungerThirst;
player playActionNow "PutDown";
 
sleep 0.1;
 
 
_qty = {_x == _part_in} count magazines player;
if (_qty >= _qty_in) then {
 
_removed = _removed + ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
if (_removed == _qty_in) then {
 
 
for "_x" from 1 to _qty_out do {
_inventory = player getVariable["WeaponModInventory",[]];
player setVariable ["WeaponModInventory",_inventory + [_mod],true];
 
};
 
cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
 
} else {
 
// Return items from botched trade.
for "_x" from 1 to _removed do {
player addMagazine _part_in;
};
_abort = true;
};
 
} else {
_needed =  _qty_in - _qty;
cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"];
};
 
sleep 1;
_abort = true;
if(_abort) exitWith {};
};
 
 

DZE_ActionInProgress = false;

 

Is this modified code from the traders that buy empty bottles? If so then I think it should work.

 

  On 7/27/2014 at 9:26 AM, Goon said:

Hi would this work for overpoch guns, would i be able to make the edits needed. 

How hard would it be.

 

Many thanks

Yes it's totally possible to set this up for overpoch -- unfortunately I only went through and mapped all the guns for vanilla Epoch.

 

On github it explains how to set up the mappings.

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...
  On 2/26/2015 at 5:15 AM, (AOW)Recon said:

lol i was just working on if we get a group of people we can get this in no time

I'm In

I have been wanting overwatch weapons for too long now...

we should all choose a weapon class

I choose NOT the ACR's

configuration instructions

https://github.com/mudzereli/DayZEpochWeaponMods#configuration

Overwatch classnames...

http://pastebin.com/eDfEBdQs

Link to comment
Share on other sites

  • 1 month later...
  On 2/26/2015 at 1:10 AM, BetterDeadThanZed said:

Just wondering if anyone ever added the Overwatch weapons to this that would be willing to share?

 

Hey Zed, been quite a while since we've spoke!

I didn't get around to doing the G36's and I omitted the snow camo ACR's but here is what I'm using on my Overpoch server.

 

http://pastebin.com/gNwdffie

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

was this built to depend on the deployanything mod? This is the error i am getting after intalling the weaponmod...

  Reveal hidden contents

what would i need to do to get weaponmod working without it? OR a link to a 1.0.5.1 compatible version of deployanything?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...