Jump to content

Dupe briefcases


godmode8

Recommended Posts

Sorry for my English , I write through
translator. Recently I discovered
dupe  on the server . 
Actions are :
In the inventory we have 1 briefcase

Lower the FPS and start to remove 10oz

At the end of briefcase throw down on the ground / car / backpack

Get 1 full briefcase 9x10 oz + 10oz.

The solution can only see through a screen lock with low FPS with an open inventory , like in this script , but the experience is not enough . I would be grateful for help in writing the script .
Link to comment
Share on other sites

Maybe add something that doesn't allow gear opening with low fps in your dayz_spaceinterrupt.sqf

if diag_fps < 8 {titleText ["Your FPS it too low! Try lowing settings!"]} else {createdialog "gear"};

put that in the gear bit of the dayz_spaceinterrupt.sqf (im not sure that the actual dialog for the gear is so check that yourself.

I'm not sure if this will work, will test later though :)

Link to comment
Share on other sites

@godmode8  try it : forget the antidup,   open your dayz_spaceinterrupt.sqf  (if ure using snap pro  u have this file into the mod folder, if not you need create a custom spaceinterrupt). I assume you have one cuz youre running justbullet antidup.

find this:

if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) then {

replace by:

if (((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) && diag_fps > 10) then {

or with it: (im not sure about the syntax so try if works with one of them)

if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and (diag_fps > 10) and !_shift and !_ctrl and !_alt && !dialog) then {

 

other way to try:

if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) then {

if (diag_fps > 10) then {

createGearDialog [player, "RscDisplayGear"];
            _handled = true;

};
};

 

Link to comment
Share on other sites

3 hours ago, seelenapparat said:

thats all good and fine, but what do you do if I open my gear first and then lower the fps? :)

mmm maybe something like that be correct?

if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) then {
open = true;
}else{ 
open = false;
};
while {open} do {
            createGearDialog [player, "RscDisplayGear"];
            _handled = true;
if (diag_fps < 10) exitWith {
cutText [format["Lower FPS"], "PLAIN DOWN"];
open = false;                  
};
};

 

Link to comment
Share on other sites

maybe we need to take a different approach:

step away from the keyboard stuff.

maybe try to use a file which uses already a while do loop (e.g. player_spawn2.sqf has 2 second sleep)

and do something like this maybe:

 - is gear open?

_abortGear = false;

if( !isNull (FindDisplay 106) ) then {
    if (_abortGear) then {
        (FindDisplay 106) closeDisplay 1;
    };
};

 - add a check for the player fps?

if (diag_fps < 10) then {
    _abortGear = true;
};

Link to comment
Share on other sites

16 hours ago, juandayz said:

@godmode8  try it : forget the antidup,   open your dayz_spaceinterrupt.sqf  (if ure using snap pro  u have this file into the mod folder, if not you need create a custom spaceinterrupt). I assume you have one cuz youre running justbullet antidup.

find this:

if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) then {

replace by:

if (((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) && diag_fps > 10) then {

or with it: (im not sure about the syntax so try if works with one of them)

if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and (diag_fps > 10) and !_shift and !_ctrl and !_alt && !dialog) then {

 

other way to try:

if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) then {

if (diag_fps > 10) then {

createGearDialog [player, "RscDisplayGear"];
            _handled = true;

};
};

 

 

1 hour ago, juandayz said:

mmm maybe something like that be correct?


if ((_dikCode in actionKeys "Gear") and (vehicle player != player) and !_shift and !_ctrl and !_alt && !dialog) then {
open = true;
}else{ 
open = false;
};
while {open} do {
            createGearDialog [player, "RscDisplayGear"];
            _handled = true;
if (diag_fps < 10) exitWith {
cutText [format["Lower FPS"], "PLAIN DOWN"];
open = false;                  
};
};

 

it did not work , will put my spaceinterrupt.sqf 

https://www.sendspace.com/file/8e00wu

Link to comment
Share on other sites

9 hours ago, godmode8 said:

 


it did not work , will put my spaceinterrupt.sqf 

https://www.sendspace.com/file/8e00wu

mm   the @seelenapparat way dsnt work trough spaceinterrupt...  i guess he say create a new sqf with his code and call it in !if  is dedicated section of init.sqf or something like this. 

or maybe:

if ((_dikCode in actionKeys "Gear") && (vehicle player != player) && !_shift && !_ctrl && !_alt && !dialog) then {
_null = execVM "custom\seelenapparatway.sqf";
};

or

Spoiler

if (_dikCode in (actionKeys "GetOver")) then {
    
    if (player isKindOf  "PZombie_VB") then {
        _handled = true;
        DZE_PZATTACK = true;
    } else {
        _nearbyObjects = nearestObjects[getPosATL player, dayz_disallowedVault, 8];
        if (count _nearbyObjects > 0) then {
            if((diag_tickTime - dayz_lastCheckBit > 4)) then {
                [objNull, player, rSwitchMove,"GetOver"] call RE;
                player playActionNow "GetOver";
                dayz_lastCheckBit = diag_tickTime;
            } else {
                _handled = true;
            };
        };
    };
};

//G MENU
if (_dikCode == 0x22) then {  
    
_null = execVM "custom\seelenapparatway.sqf";

};

seelenapparatway.sqf

Spoiler

his code here

 

Link to comment
Share on other sites

yes exactly. something like this:

in init.sqf in !(isDedicated) section:

[] execVM "path\to\antidupe.sqf";

and in the antidupe.sqf put something along this:

Spoiler

private ["_abortGear"];

while {true} do {
	_abortGear = false;
	if (diag_fps < 10) then {
		_abortGear = true;
	};
	if( !isNull (FindDisplay 106) ) then {
		if (_abortGear) then {
			(FindDisplay 106) closeDisplay 1;
		};
	};
	uisleep 0.2;
};

 

 

thats just the idea, needs some fleshing out and testing ofcourse. :)

Link to comment
Share on other sites

@godmode8 i test the @seelenapparat way and works so well. (post above) please put on your main post for the others. Tnks Seelenapparat!

1-create this path: mpmissions\yourinstance\seelen_antidupe\

2-create a sqf called seelen_antidupe.sqf and drop into new path

Spoiler

//////seelenapparat antidupe restrict open gear when fps are lower//////

////////tnks for it seelenapparat!! and sory for put a name to you script and make an install guide :D////////////////

 

private ["_abortGear","_fps","_validfps"];
_fps = round(diag_fps);
_validfps = 10; //put any other value to get the top of restriction
while {true} do {
    _abortGear = false;
    if (diag_fps <= _validfps) then {
        _abortGear = true;
    };
    if( !isNull (FindDisplay 106) ) then {
        if (_abortGear) then {
            (FindDisplay 106) closeDisplay 1;

           sleep 1;
            systemChat format["Inventory was closed by low value in fps: %1",_fps];//put your own text
        };
    };
    uisleep 0.2;
};

 

3-go to your init.sqf  find:

if (!isDedicated) then {

somewhere into this section paste:

[] execVM "seelen_antidupe\seelen_antidupe.sqf";

 

**For test it:  Launch a lot of smoke granades to get lower fps. then press G. (your inventory do not appear)

**If u press G before drop your fps, then inventory will be closed automatically.

Link to comment
Share on other sites

Many thanks for this script . Even a small request . Briefcase can be drop when the server lags . The solution is to close the inventory immediately after the extraction of 10oz . If it is not hard to help to solve this problem and thanks again

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...