SmokeyMeadow
Well-Known Member
Haha, it works great! Even works at my custom location. Good job. obviously I credited you on the update.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Player on my server can "make" ammo with the use of scrap, But... no scrap spawns in the server at all.. they have to use a tier crafting system to craft components up into scrap eventually, and like Matt L mentioned you can incorporate a fail percentage or interuption, maybe even have the ammo blow up in your face as a lack of skills to "Press the Ammo" *evil grin*
You have to watch as players don't discard "anthing" they find, tin cans, toilet paper, trash is gold lol...
I need to rework that fn_selfaction script. Try using this instead:Eumz,
Could it be me,
or is it also possible to make mags WITHOUT the scrap metal?
or did i screw something up?
(didn't alter anything in the ammopress files so far, only did some random testing and came to the conclusion that you're able to make mags without the scrap)
// AMMO PRESS ON
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressfn < 0) then {
s_player_pressfn = player addAction ["Activate Ammo Press (FAL Mags)","scripts\fnmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressfn;
s_player_pressfn = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressstn < 0) then {
s_player_pressstn = player addAction ["Activate Ammo Press (STNAG Mags)","scripts\stnagmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressstn;
s_player_pressstn = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressAKM < 0) then {
s_player_pressAKM = player addAction ["Activate Ammo Press (AKM Mags)","scripts\AKMMag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressAKM;
s_player_pressAKM = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressAK < 0) then {
s_player_pressAK = player addAction ["Activate Ammo Press (AK Mags)","scripts\AKMag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressAK;
s_player_pressAK = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressDMR < 0) then {
s_player_pressDMR = player addAction ["Activate Ammo Press (DMR Mags)","scripts\DMRmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressDMR;
s_player_pressDMR = -1;
};
// AMMO PRESS OFF
// ---------------------------------------AMMO PRESS ON----------------------------------
private["_playerPosX","_playerPosY","_playerPosZ","_canPress"];
_playerPosX = getPosASL player select 0;
_playerPosY = getPosASL player select 1;
_playerPosZ = getPosASL player select 2;
_canPress = _playerPosX > 10410 and _playerPosX < 10412 and _playerPosY > 2596 and _playerPosY < 2598 and _playerPosZ > 29 and _playerPosZ < 30 && ("PartGeneric" in magazines player);
if ( _canPress ) then {
if (s_player_pressstn < 0) then {
s_player_pressstn = player addAction ["Activate Ammo Press (STNAG Mags)","scripts\ammopress\stnagmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressstn;
s_player_pressstn = -1;
};
if ( _canPress ) then {
if (s_player_pressfn < 0) then {
s_player_pressfn = player addAction ["Activate Ammo Press (FAL Mags)","scripts\ammopress\fnmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressfn;
s_player_pressfn = -1;
};
if ( _canPress ) then {
if (s_player_pressAKM < 0) then {
s_player_pressAKM = player addAction ["Activate Ammo Press (AKM Mags)","scripts\ammopress\AKMMag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressAKM;
s_player_pressAKM = -1;
};
if ( _canPress ) then {
if (s_player_pressAK < 0) then {
s_player_pressAK = player addAction ["Activate Ammo Press (AK Mags)","scripts\ammopress\AKMag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressAK;
s_player_pressAK = -1;
};
if ( _canPress ) then {
if (s_player_pressDMR < 0) then {
s_player_pressDMR = player addAction ["Activate Ammo Press (DMR Mags)","scripts\ammopress\DMRmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressDMR;
s_player_pressDMR = -1;
};
// ---------------------------------------AMMO PRESS OFF---------------------------------
_canPress = _playerPosX > 10410 and _playerPosX < 10412 and _playerPosY > 2596 and _playerPosY < 2598 and _playerPosZ > 29 and _playerPosZ < 30 && ("PartGeneric" in magazines player);
if ( _canPress ) then {
if (s_player_pressSCAR < 0) then {
s_player_pressSCAR = player addAction ["Activate Ammo Press (SCAR Mags)","scripts\ammopress\scar.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressSCAR;
s_player_pressSCAR = -1;
};
if ( _canPress ) then {
if (s_player_press417 < 0) then {
s_player_pressSCAR = player addAction ["Activate Ammo Press (417 Mags)","scripts\ammopress\417mag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_press417;
s_player_press417 = -1;
};
// ---------------------------------------AMMO PRESS OFF---------------------------------
// AMMO PRESS ON
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressfn < 0) then {
s_player_pressfn = player addAction ["Activate Ammo Press (FAL Mags)","scripts\fnmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressfn;
s_player_pressfn = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressstn < 0) then {
s_player_pressstn = player addAction ["Activate Ammo Press (STNAG Mags)","scripts\stnagmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressstn;
s_player_pressstn = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressAKM < 0) then {
s_player_pressAKM = player addAction ["Activate Ammo Press (AKM Mags)","scripts\AKMMag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressAKM;
s_player_pressAKM = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressAK < 0) then {
s_player_pressAK = player addAction ["Activate Ammo Press (AK Mags)","scripts\AKMag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressAK;
s_player_pressAK = -1;
};
if (cursorTarget isKindOf "Land_Ind_Stack_Big" && ("PartGeneric" in magazines player) and (player distance cursorTarget < 8) and _canDo) then {
if (s_player_pressDMR < 0) then {
s_player_pressDMR = player addAction ["Activate Ammo Press (DMR Mags)","scripts\DMRmag.sqf",cursorTarget, 5, false, true, "",""];
};
} else {
player removeAction s_player_pressDMR;
s_player_pressDMR = -1;
};
// AMMO PRESS OFF
I don't know if it will work with Epoch, I never tested that. Try the code I posted above instead, the one posted with the release is just for vanilla chernarus servers.I have tried to install this script. I have done the install to the tee. But does not work . the questions is will it work on dayz eopoch.
It works on my Epoch server.
Smokey,
Is there a way to make this work on vending machines? I've tried fiddling with the script but truthfully I don't know much about scripting so I'm not having any luck.
My issue is just trying to get the option when I step up to a vending machine.