Jump to content
  • 0
Sign in to follow this  
Joshyy

Coin Problem/Exploit

Question

17 answers to this question

Recommended Posts

  • 0

Its a militarised server so buying good vehicles cost 7m which is a lot on the server any other solutions for this. 

The problem isint about how much they walk around with but how they can just relog after giving someone money and get the money back instantly

Share this post


Link to post
Share on other sites
  • 0

Problem is not the amount of coins they carry or store but how much they pick up. As in, a player can pick up null amount of coins if he knows what he's doing which results infinite amount of money at his disposal.

This particaular problem exists on just about every server running global banking (SC 2.0)

Share this post


Link to post
Share on other sites
  • 0

Well i dont have the issue Antichrist since i capped all the amounts .

Capped the amount of coins allowed to carry , capped prices , capped pick up amount , capped transfer amount ,capped amount you can redraw and deposite .

Also fixed the dupe with giving eachother same amount at same time  .

I noticed when people give coins over a mill then logg of and come back on it was duped , after all my fixes i never had the issue again .

Share this post


Link to post
Share on other sites
  • 0

Could be i dont know i would be interested to see though , but there is no fix for it ?

I've also seen a coin system working on what i think i is arma2net you have experience with that ?

If so care to eplain some things to me ? :D

Share this post


Link to post
Share on other sites
  • 0
On 23/12/2015 at 11:41 PM, creativv said:

Well i dont have the issue Antichrist since i capped all the amounts .

Capped the amount of coins allowed to carry , capped prices , capped pick up amount , capped transfer amount ,capped amount you can redraw and deposite .

Also fixed the dupe with giving eachother same amount at same time  .

I noticed when people give coins over a mill then logg of and come back on it was duped , after all my fixes i never had the issue again .

How do you cap the maximum pickup price, trasnfer amount and withdraw/deposite amount, may i ask 

Thanks,

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, Joshyy said:

How do you cap the maximum pickup price, trasnfer amount and withdraw/deposite amount, may i ask 

Thanks,

i can show u mine

check_wallet.sqf

private ["_body", "_hisMoney", "_myMoney", "_killsH", "_test2", "_headShots", "_test","_playeridke","_humanity"];

_body = _this select 3;

_hisMoney = _body getVariable ["cashMoney",0];
// Part to prevent them picking up to large amounds at once 
if(_hisMoney > 950000) exitWith {
		cutText ["This player has to many coins you cant pick it up it will bug your cash", "PLAIN DOWN"];
    };
// This i put in trying to get rid of players being NULL'd
if(_hisMoney < 1) exitWith {
		cutText ["This Player/AI is a poor bastard and has no coins!!!", "PLAIN DOWN"];
    };
_PlayerNear = _body call dze_isnearest_player;
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};

_name = _body getVariable ["bodyName","unknown"];
_hisMoney = _body getVariable ["cashMoney",0];
_myMoney = player getVariable ["cashMoney",0];
_myMoney = _myMoney + _hisMoney;
_body setVariable ["cashMoney", 0 , true];

player setVariable ["cashMoney", _myMoney , true];

systemChat format ['You took %1 coins, ID says %2 !',_hisMoney,_name];
sleep 2;

_cid =	player getVariable ["CharacterID","0"];
_cashMoney = player getVariable ["cashMoney",0];

if(_cashMoney > 0) then{

} else {

_cashMoney = 0;

};	

I put things like this in the init of my coin init .

if (LimitOnPlayer && ((_wealth + _amount ) >  MaxPlayerCoins )) exitWith { cutText ["You can only carry 950,000", "PLAIN DOWN"];};

Dont forget you need to make LimitOnPlayer and MaxPlayerCoins yourself in your variables.sqf like this for example

LimitOnPlayer = true;
MaxPlayerCoins = 950000;

 

 

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, creativv said:

i can show u mine

check_wallet.sqf

private ["_body", "_hisMoney", "_myMoney", "_killsH", "_test2", "_headShots", "_test","_playeridke","_humanity"];

_body = _this select 3;

_hisMoney = _body getVariable ["cashMoney",0];
// Part to prevent them picking up to large amounds at once 
if(_hisMoney > 950000) exitWith {
		cutText ["This player has to many coins you cant pick it up it will bug your cash", "PLAIN DOWN"];
    };
// This i put in trying to get rid of players being NULL'd
if(_hisMoney < 1) exitWith {
		cutText ["This Player/AI is a poor bastard and has no coins!!!", "PLAIN DOWN"];
    };
_PlayerNear = _body call dze_isnearest_player;
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};

_name = _body getVariable ["bodyName","unknown"];
_hisMoney = _body getVariable ["cashMoney",0];
_myMoney = player getVariable ["cashMoney",0];
_myMoney = _myMoney + _hisMoney;
_body setVariable ["cashMoney", 0 , true];

player setVariable ["cashMoney", _myMoney , true];

systemChat format ['You took %1 coins, ID says %2 !',_hisMoney,_name];
sleep 2;

_cid =	player getVariable ["CharacterID","0"];
_cashMoney = player getVariable ["cashMoney",0];

if(_cashMoney > 0) then{

} else {

_cashMoney = 0;

};	

I put things like this in the init of my coin init .

if (LimitOnPlayer && ((_wealth + _amount ) >  MaxPlayerCoins )) exitWith { cutText ["You can only carry 950,000", "PLAIN DOWN"];};

Dont forget you need to make LimitOnPlayer and MaxPlayerCoins yourself in your variables.sqf like this for example

LimitOnPlayer = true;
MaxPlayerCoins = 950000;

 

 

The limit on player didnt work? I set the limit to 975000 and when a player went over that limit it gave an error 

 9:11:24 Database(1): [Error] Error 1690 (BIGINT UNSIGNED value is out of range in '(`dayz_test`.`character_data`.`CashMoney` - 50000)') in MySQLQuery SQL: 'UPDATE `Character_DATA` SET `Backpack` = '[\"DZ_ALICE_Pack_EP1\",[[],[]],[[],[]]]' , `CashMoney` = (`CashMoney` - 50000) , `CurrentState` = '[\"RH_g18\",\"aidlpercmstpsraswpstdnon_player_idlesteady02\",37,[]]' , `DistanceFoot` = (`DistanceFoot` + 16) , `Duration` = (`Duration` + 1) , `Inventory` = '[[\"ItemMap\",\"ItemToolbox\",\"RH_g18\",\"ItemRadio\",\"ItemGPS\",\"NVGoggles\"],[\"ItemBandage\",\"ItemBandage\",\"ItemBandage\",\"ItemPainkiller\",\"ItemWaterbottle\",\"FoodPistachio\",\"PartGeneric\",\"RH_19Rnd_9x19_g18\",\"RH_19Rnd_9x19_g18\",\"RH_19Rnd_9x19_g18\"]]' , `Medical` = '[false,false,false,false,false,false,false,12000,[],[0,0],0,[0,0.206]]' , `Worldspace` = '[149,[6308.68,7810.14,0.001]]', `InstanceID` = 11  WHERE `CharacterID` = 43'
 

thats the whole error line.

Share this post


Link to post
Share on other sites
  • 0

No you can add that in bankdialogwitgdrawamount like this  .

 

BankDialogWithdrawAmount = {

	private ["_amount","_bank","_wealth"];

	_amount = parseNumber (_this select 0);	
	_bank = player getVariable ["bankMoney", 0];
	_wealth = player getVariable["cashMoney",0];
	
	if (LimitOnPlayer && ((_wealth + _amount ) >  MaxPlayerCoins )) exitWith { cutText ["You can only carry 950,000", "PLAIN DOWN"];};
	if(_amount > 950000) exitWith { cutText ["You can not withdraw more then 950,000 coins at once.", "PLAIN DOWN"]; };
	if(_amount < 1 or _amount > _bank) exitWith { cutText ["You can not withdraw more than is in your bank.", "PLAIN DOWN"]; };

	player setVariable["cashMoney",(_wealth + _amount),true];
	player setVariable["bankMoney",(_bank - _amount),true];

	PVDZE_plr_Save = [player,(magazines player),true,true] ;
	publicVariableServer "PVDZE_plr_Save";

	PVDZE_bank_Save = [player];
	publicVariableServer "PVDZE_bank_Save";

	cutText [format["You have withdrawn %1 %2.", [_amount] call BIS_fnc_numberText, CurrencyName], "PLAIN DOWN"];

};

Also you will need to make an adjustment in your variables.sqf where the max bank amount is and add the limit on player is true or false and the amount .

CurrencyName = "Coins"; // name of your currency
LimitOnBank = true; // false = no limits, true = banks are limited on the value below
MaxBankMoney = 1000000; // limit on bank for normal players
DonatorBank = ["0"]; // Bigger banks, Players ID
MaxDonatorBankMoney = 3000000; // Bank size for donators	
InstantTrading = true; // (True = No Animation / False = Animation)
LimitOnPlayer = true;
MaxPlayerCoins = 950000; 

If you read thru the dialogs and look carefull they will make sense and you will understand it .

in this way you can cap anything you want with the coin system . giving money , banking money just about anything you just need to carefully read the coin init and try to understand it a bit .

I did not come from a computer background infact few months ago i never seen a server file and i am a Carpenter but its not superhard just as long as you read carefully .

Share this post


Link to post
Share on other sites
  • 0

I did the same thing in the giveplayeramount ill show you .

 

GivePlayerAmount = {
private ["_amount","_target","_wealth"];
_amount = parseNumber (_this select 0);
_target = cursorTarget;
_wealth = player getVariable["cashMoney",0];
_twealth = _target getVariable["cashMoney",0];
_InTrd = _target getVariable ["TrBsy",false];
_isMan = _target isKindOf "Man";
if (_amount < 1 or _amount > _wealth) exitWith {
cutText ["You can not give more than you currently have.", "PLAIN DOWN"];
};
if (LimitOnPlayer && ((_twealth + _amount ) >  MaxPlayerCoins )) exitWith {  //This is what i added 
		cutText ["Player has to many coins you can only carry 950,000", "PLAIN DOWN"];
};
if (!_isMan) exitWith {
cutText ["You are not facing anyone.", "PLAIN DOWN"];
};
if (_wealth == _twealth) exitWith {
cutText ["FAILED : Both Targets have same amount of money.", "PLAIN DOWN"];
};   
if (_InTrd) exitWith {
        cutText ["Other Player is busy, please wait.", "PLAIN DOWN"];
    };

you can see the explantions of for example _twealth  its says :    _twealth = _target getVariable["cashMoney",0];

so it means that _twealth is the coins of the target you are trying to give coins to  and then _amount = parseNumber (_this select 0);  is the ammount the player wants to give .

so (_twealth + _amount ) if they add up to more then the LimitOnPlayer you created in variables the script will end with a cuttext saying its not possible because it is to much .

Hope you understood it a bit since i am typing really fast in a hurry :D

 

Share this post


Link to post
Share on other sites
  • 0

Dont just copy stuff over but try to understand it a little bit , there is a great video made by Raymix that actually helpen me so much to understand allot .

Believe me i am far from being a dev or a supermodder but i do try to understand the concepts instead of trying to copy it over without even understanding and believe me you will need that simply because not

every script will cooperate with eachother and you will need to have at least a bit of understanding .

If you ever need some help i am Always willing to help a bit .

Share this post


Link to post
Share on other sites
  • 0
Just now, creativv said:

Dont just copy stuff over but try to understand it a little bit , there is a great video made by Raymix that actually helpen me so much to understand allot .

Believe me i am far from being a dev or a supermodder but i do try to understand the concepts instead of trying to copy it over without even understanding and believe me you will need that simply because not

every script will cooperate with eachother and you will need to have at least a bit of understanding .

If you ever need some help i am Always willing to help a bit .

Sorry moderators for spamming a bit in posts :D

https://www.youtube.com/watch?v=cN9ob9FPUHY     the video by raymix its a bit long but really good

 

Share this post


Link to post
Share on other sites
  • 0
17 hours ago, creativv said:

 

 

17 hours ago, creativv said:

Dont just copy stuff over but try to understand it a little bit , there is a great video made by Raymix that actually helpen me so much to understand allot .

Believe me i am far from being a dev or a supermodder but i do try to understand the concepts instead of trying to copy it over without even understanding and believe me you will need that simply because not

every script will cooperate with eachother and you will need to have at least a bit of understanding .

If you ever need some help i am Always willing to help a bit .

Thanks for the video, currently watching it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Similar Content

    • By Vladick
      BSBS Server IP: 216.244.93.103:7802
      Website: https://bsbsepoch.000webhostapp.com/
      Discord: https://discord.gg/PVn8PvG
      Server Features:
      PvPvE Database wiped 1/5/18 ESS V3 spawn selection Coins and Global Banking WAI missions and Roaming DZAI Bandits Customized map additions Skalisky Bridge Skalisky Island Bandit Camp with high loot (fun mission!) Garage Door Opener Virtual Garage Deploy bike Refuel, Repair, Rearm Take clothes Bury Body Butcher Body Locate vehicle with keys and GPS One plot poll per player Indestructible bases Trader Safe Zones Day/Night Schedule 4-hour restarts
    • By JakeQue
      Hi, me again.
       
      For some reason when i spawn in and collect coins or loadout the next time i disconnect and come back it puts me back into spawn and money is all disappeared. 

      There's no hive errors.
      The only error in the Server RPT is :
      And I have 2 errors in my client RPT. Looks like they relate to zsc but I have reinstalled it from scratch and still the same.
      and 
       
      Sorry to be such a noob with this one!!
    • By Tricks
      Hello community,
      Well last night I had a player message me on Discord asking for a free Lapua. He was very rude and insistent, then left all of a sudden. Some players were doing a mission and all of a sudden AI would spawn right on top of one of the players who then became invincible. I know the player and he was not hacking. He also had 999,999,999 coins and humanity on him. I restarted the server to fix the issue with the AI. Later anytime he accessed his safe, all the players on the server would explode into the air and die when they landed, not by the explosion. We later figured out it was the 2 Lapuas he took from the mission that were in his safe. I deleted them and it seems to have fixed the issue.
      Anyone else experienced this?
    • By iben
      Hello guys,
      do you remember old "Paint vehicles" script? Let's look back to idea fathers:
      ===
      CREDITS:
      All credits goes to its original authors:
      DayZ Epoch developers, collaborators and contributors (thank you guys for your excellent work!) (visit them on github)
      Maca134 for orginal color vehicle script.
      @Zupa for the idea of painting vehicles in two different colors.
      @0verHeaT for script public release - this version we are updating for 1.0.6.1+ (see original thread)
      @raymix for list of paintable vehicles for this script (see original thread)
      ---
      Special Thank you goes to @DAmNRelentless for taking care of Github repo.
       ===
      This script was updated for Epoch 1.0.6.2 and upgraded.
      ===
      FEATURES:
      Vehicles can be painted in two different colors Only vehicles which you own can be painted (vehicles with key) Only vehicles in ColourVehicles array can be painted Script is designed to be used along with Single currency. Player will pay for painting vehicles. UPDATED: Color values are saved in the worldspace field in database NEW: Vehicles can be unpainted to default state (default textures are loaded) UPDATED: Vehicles can be painted using GUI with visual enhancements. Use PaintVehicles defines.hpp for defining custom GUI color scheme UPDATED: Script is now fully compatible with Virtual Garage and Vehicle Key Changer (VKC) script thanks to @salival (2017-08-22).
      All scripts by @salival and this one prior update date should be upgraded to get much better player experience! UPDATED: for Epoch 1.0.6.2 ===
      Changelog:
      [2017-05-22], v1.0 | Initial release [2017-05-25], v1.1 | Optimized compiles: 5 files reduced to 1. See changes: [commit  ae29c13] [2017-08-20], v1.2 | Regular code maintenance. See changes: [commit 682f99a] and [commit 7cd8fce] [2017-10-23], v1.3 | Roll back to full version of player_forceSave (uniCoins fix: Issue not related to script itself). [2017-12-04], v1.4 | Safer manipulation with data sending to server. Basic defines fix - from sqf to hpp.  See changes: [commit 2735dea] [2017-29-04], v1.5 | Update for Epoch 1.0.6.2 [2017-29-04], v1.5.1 | FIX: fn_selfAction path (thx @hooty): [commit 38fe105] ===
      How it looks like:

      === database screenshot

      ===
      MiniShowcase
      ===
      How to install:
      We are not using common way how is script included to current folder structure (like grab whole folder and put it to the root of mission folder) - 
      that's why read carefully, use repo folder structure (or similar) and compare tool like diffmerge! If you have troubles, just ask here or send me PM.
      Source files are available at Github repo. You can download them from here.
      For client side we need these folders in the root of your 'MPMissions\Dayz_Epoch_11.Chernarus' folder:
      actions: we will store file with scroll action menu command Paint vehicle here compile: we will store core script client files here Configs: we will store defines && dialog config files for script GUI here gui:  we will store your "Money" or "Coins" picture here (Change path inside: `dayz_code\compile\player_paintVehicle.sqf`) init: we will load all compiles and variables from here ... and finaly files:
      description.ext: we will load your defines and dialogs from here via master.hpp init.sqf: we will load your custom compiles and variables from here For server side (dayz_server) we need to touch these files:
      compiles\paintVehicles  (copy whole folder to compiles) compiles\server_updateObject.sqf system\server_monitor.sqf init\server_functions.sqf (compile init.sqf) ===
      Battleye
      // Add an exception to publicvariable.txt !="PVDZE_veh_Color" ===
      infiSTAR
      // Add an exception to allowed dialogs 571113 ===
      ...that's all, Have Fun!!
      Cheers...
      ===
    • By Bricktop
      **NEW** Manup-PvPvE | v1.0.6.2 | 5-Mil + KITS | Player Teleport | VirtGarage | Banks | Checks | Perks | Cap&Hold | GemCraft | Semi-Mil | High [email protected]@T

       
      ==============================
      M A N U P - 1.0.6.2 - U P D A T E
      The NEW SERVER is Unlocked! 
      DayZ Overpoch Chernarus 1.0.6.2
      IP: 216.244.87.253:6302
      This is a PvPvE Militarized Server with High Loot and High Risk 
      $5,000,000 Start coins + Cinder & Metal Base kit

      ==============================
      MODS - EDITS - SCRIPTS
      ==============================
      > Suicide
      > Earplugs
      > Auto Run
      > Tow & Lift
      > Safe Zones
      > Flip Vehicle 
      > Plot For Life
      > Bury Bodies
      > Take Clothes
      > Click Actions
      > Harvest Hemp
      > Service Points
      > Locate Vehicle
      > Virtual Garage
      > Player Teleport
      > Custom Traders
      > Global Banking
      > Free Spawn Kits
      > Tanks and APC's
      > Attack Choppers
      > Scan For Players
      > Deploy Anything
      > KO Melee Combat
      > Plot Management
      > Scan For Animals
      > Scan For Zombies
      > Treasure Hunting
      > Turn On/Off Grass 
      > Snap With Vectors
      > Custom Trader City
      > Group Management
      > Garage Door Opener
      > Safe Zone Relocate
      > Custom Action Wheel 
      > Vehicle Key Changer
      > Humanity Spawn Kits
      > Custom Event Crates
      > No Spawn Restriction
      > Sell On Site Missions
      > Change View Distance
      > Custom Debug Monitor
      > Player Zombie Shields
      > remote vehicle options
      > Humanity spawn vehicles 
      > Community Localizations
      > Humanity Spawn Classes
      > Custom Military locations
      > Custom Cap & Hold Missions
      > Custom NEAF / NWAF / BALOTA
      > Door Management With Eye Scan
      > More custom stuff inside ....

      ==============================
      Special thanks to @salival  for all his help with the conversion. I couldn't of done it with out you!
      ==============================
      Thanks For Playing ManUp - Enjoy and Please report any bugs.
      http://steamcommunity.com/groups/manupsurvival#
      https://discord.gg/V85spbD


  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...