0verHeaT Posted January 18, 2015 Report Share Posted January 18, 2015 Since a special method for duplicting his own gear on Arms 2 Epoch has become quite popular the last month, I though about a possible way to stop this. The so-called DC dupe allows any player to dupe their entire gear at any storage unit. I don't think I have to explain this more clearer cause the most of you guys know how it works. How would you stop the player from duping? My solution: Whenever a player opens his gear menu infront of any storage unit, he sets temporary variable (boolean) to the storage unit. After closing the gear dialog the variable is set through publicVariables to false. That means, if a player has lost his connection the variable can't be set to false and this will be reported to the server logs. Additionally the server checks if a player has lost the connection after closing the gear dialog (with 'isPlayer' command). If the 'isPlayer' command does not return a player, we know that he is trying to dupe and we can delete the duped gear. Theoretically this sounds quite convincing, but keep in mind that this is only experimental at the moment. Thus this script is recommended for advanced server owners only, because it can cause huge errors if it is not installed correctly! If you find any bugs or errors, please report them here! My Github: https://github.com/0verHeaT/DCDupeFix Rythron, 45ACP, -Dutchy- and 1 other 4 Link to comment Share on other sites More sharing options...
DimitriPokki Posted January 18, 2015 Report Share Posted January 18, 2015 Good job Link to comment Share on other sites More sharing options...
raymix Posted January 18, 2015 Report Share Posted January 18, 2015 I like the idea, but I'd suggest staying away from public vars since they adds to network traffic, this will cause problems on populated servers, since almost everything is kinda a "container" (sry didn't see your code if you whitelist objects to be checked). However, your fix could be applied in a different scope - outside of missionNamespace, these namespace variables persists even while players are not connected to server. http://killzonekid.com/arma-scripting-tutorials-variables-part-2/ Scroll down to see the goodies. If you want logs, you can just send them to server when duping is detected locally, I guess. Link to comment Share on other sites More sharing options...
0verHeaT Posted January 18, 2015 Author Report Share Posted January 18, 2015 That's right, the increased network traffic will a problem this solution is causing. I don't know how big these influences are since i did not tested it on a full server. Your idea, to solve this by using namespaces sounds promising. I'm gonna look at this soon to see whether it is possible or not. Link to comment Share on other sites More sharing options...
Bandit Posted January 18, 2015 Report Share Posted January 18, 2015 How Come "PVDZE_deb" , and not "PVDZE_dupe" You can still add _isUnconscious private ["_cTarget","_isOk","_display","_inVehicle","_isUnconscious"]; disableSerialization; _display = (_this select 0); _inVehicle = (vehicle player) != player; _cTarget = cursorTarget; _isUnconscious = player getVariable ["NORRN_unconscious",false]; if (_isUnconscious) exitWith { if (alive player) then { if (isPlayer player && _isUnconscious) then { _display closeDisplay 1; systemChat ( "You unconscious." ); player setVariable["combattimeout", time + 10, true]; player setVariable["startcombattimer", 0]; dayz_combat = 1; }; }; }; if(_inVehicle) then { _cTarget = (vehicle player); }; _isOk = false; { if(!_isOk) then { _isOk = _cTarget isKindOf _x; }; } forEach ["LandVehicle","Air", "Ship"]; if((locked _cTarget) && _isOk && (((vehicle player) distance _cTarget) < 12)) then { cutText [(localize "str_epoch_player_7") , "PLAIN DOWN"]; _display closeDisplay 1; }; if (inSafeZone and _cTarget isKindOf "Man" and alive _cTarget and (((vehicle player) distance _cTarget) < 12)) then { cutText ["Cannot access other players gear in the safezone." , "PLAIN DOWN"]; _display closeDisplay 1; [_cTarget] spawn { private ["_transportMax","_obj"]; _obj = _this select 0; if (vehicle player != player || isPlayer _obj) exitWith {}; _transportMax = (getNumber (configFile >> "CfgVehicles" >> (typeof _obj) >> "transportMaxWeapons") + getNumber (configFile >> "CfgVehicles" >> (typeof _obj) >> "transportMaxMagazines") + getNumber (configFile >> "CfgVehicles" >> (typeof _obj) >> "transportMaxBackpacks")); if (_transportMax < 1 || (typeOf _obj) == "WeaponHolder") exitWith {}; if (isNil "GearDisplay") then {GearDisplay = false;}; if (isNil "DupeObject") then {DupeObject = objNull;}; if (GearDisplay/* && _obj == DupeObject*/) exitWith { waitUntil {str(FindDisplay 106) == "Display #106"}; (FindDisplay 106) closeDisplay 0; cutText["\n\nPlease wait a moment to open your gear!","PLAIN DOWN"]; }; waitUntil {str(FindDisplay 106) == "Display #106"}; GearDisplay = true; DupeObject = _obj; PlayervarName = "DupeVar_" + (getPlayerUID player); if (DupeObject getVariable [PlayervarName,false]) then { PVDZE_deb = [player,DupeObject,"dcdupe"]; publicVariableServer "PVDZE_deb"; }; uiSleep 0.2; DupeObject setVariable [PlayervarName,true,true]; waitUntil {str(FindDisplay 106) == "No Display"}; uiSleep 0.2; PVDZE_deb = [player,DupeObject,"dupeCheck"]; publicVariableServer "PVDZE_deb"; uiSleep 1.2; PVDZE_deb = [player,"","dupeVar"]; publicVariableServer "PVDZE_deb"; uiSleep 1.4; if (DupeObject getVariable [PlayervarName,true]) then {(findDisplay 46) closeDisplay 0;}; GearDisplay = false; DupeObject = objNull; }; Link to comment Share on other sites More sharing options...
0verHeaT Posted January 19, 2015 Author Report Share Posted January 19, 2015 How Come "PVDZE_deb" , and not "PVDZE_dupe" Accidentally swaped the variables from the version is used on my server... It should be PVDZE_dupe of course. Link to comment Share on other sites More sharing options...
Jun_msk Posted February 24, 2015 Report Share Posted February 24, 2015 doesn't help Link to comment Share on other sites More sharing options...
(AOW)Recon Posted February 25, 2015 Report Share Posted February 25, 2015 i would make it were ["<OCG - REMOTE>: %1, Duping is a non-excusable offence! Stop it or you will be banned!",(name _player)]; ["<OCG - REMOTE>: %1,%2, Duping is a non-excusable offence! Stop it or you will be banned!",(name _player),(getPlayerUID player)]; Link to comment Share on other sites More sharing options...
Tricks Posted February 27, 2015 Report Share Posted February 27, 2015 (edited) Which filter does !="PVDZE_dupe" go in and which line? I followed the steps exactly, the server just hangs after loading up and I can't get in.... Edited February 27, 2015 by Tricks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now