Jump to content

Recommended Posts

This is a major glitch in giving players money. When both players have equal amount of money, and they give money to each other at the same time. The money duplicates. Then Use the duplicated money to dupe again, then it double duplicates. Keep going to be a millionaire in seconds

 

Lets say i got 500, you got 500. We both give our 500 coins to each other at the same time. It duplicates

 

There is an easy fix:

 

In your Gold/init.sqf

 

Find:

GivePlayerAmount = {
..
..
..
..
};

Replace the whole block with this:

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 (!_isMan) exitWith {
cutText ["You are not facing anyone.", "PLAIN DOWN"];
};
if (_InTrd) exitWith {
cutText ["Other Player is busy, please wait.", "PLAIN DOWN"];
};
PVDZE_account_Doublecheck = [player];
publicVariableServer "PVDZE_account_Doublecheck";
player setVariable["cashMoney",_wealth - _amount, true];
_target setVariable["cashMoney",_twealth + _amount, true];


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


cutText [format["You gave %1 %2.", _amount, CurrencyName], "PLAIN DOWN"];
};

Now Replace your bank_dialog.sqf and give_player_dialog.sqf with these: 

 

bank_dialog.sqf

private ["_dialog"];
player setVariable["TrBsy",true,0];
_dialog = createdialog "BankDialog";
call BankDialogUpdateAmounts;
waitUntil { !dialog };
uiSleep 3;
player setVariable ["TrBsy",false,0];

give_player_dialog.sqf

private ["_dialog"];player setVariable["TrBsy",true,0];
_dialog = createdialog "GivePlayerDialog";
call GivePlayerDialogAmounts;
waitUntil { !dialog };
uiSleep 3;
player setVariable ["TrBsy",false,0];

Share this post


Link to post
Share on other sites

So this only works if both sides have the exact same amount of money? I don't get it.. Where's the logic behind this?

 

Lets say i got 500, you got 500. We both give our 500 coins to each other at the same time. It duplicates

Share this post


Link to post
Share on other sites

Lets say i got 500, you got 500. We both give our 500 coins to each other at the same time. It duplicates

 

No yeah I understand that but what's the logic behind this glitch? I mean why the same amount. If this really works it should work with any number amount of coins, wouldn't it?

Share this post


Link to post
Share on other sites

No yeah I understand that but what's the logic behind this glitch? I mean why the same amount. If this really works it should work with any number amount of coins, wouldn't it?

 

Dunno the logic, maybe it works with different numbers too 0.o

Share this post


Link to post
Share on other sites

it seems at least on my test server if both players trade at the same time the money is added together and given to both people.  Example is if I have 200 coins and my friend has 500 coins.  We both select give coins to each other and give our full amount.  If we both select the Give option we both end up with 700 coins.  Waiting to test this on my live server to see if the behavior is the same.  I could have sworn I tested this earlier and it did not do this.  The same amount however is fixed using the above.

Share this post


Link to post
Share on other sites

it seems at least on my test server if both players trade at the same time the money is added together and given to both people.  Example is if I have 200 coins and my friend has 500 coins.  We both select give coins to each other and give our full amount.  If we both select the Give option we both end up with 700 coins.  Waiting to test this on my live server to see if the behavior is the same.  I could have sworn I tested this earlier and it did not do this.  The same amount however is fixed using the above.

 

I have yet to find out how we can possibly fix that issue. 

Share this post


Link to post
Share on other sites

What if you tried....

GivePlayerAmount = {

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

    player setVariable ["TrBsy",true,0];

    _InTrd = _target getVariable ["TrBsy",0];

    _amount = parseNumber (_this select 0);

    _target = cursorTarget;

    _wealth = player getVariable["cashMoney",0];

    _twealth = _target getVariable["cashMoney",0];

    _isMan = _target isKindOf "Man";

    if (_amount < 1 or _amount > _wealth) exitWith {

        cutText ["You can not give more than you currently have.", "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 ["Player is busy, please wait.", "PLAIN DOWN"];

    };

    PVDZE_account_Doublecheck = [player];

    publicVariableServer "PVDZE_account_Doublecheck";

    player setVariable["cashMoney",_wealth - _amount, true];
   
    _target setVariable["cashMoney",_twealth + _amount, true];



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

    publicVariableServer "PVDZE_plr_Save";

    PVDZE_plr_Save = [_target,(magazines _target),true,true] ;

    publicVariableServer "PVDZE_plr_Save";



    cutText [format["You gave %1 %2.", _amount, CurrencyName], "PLAIN DOWN"];

    uiSleep 3;

    player setVariable ["TrBsy",false,0];

};

 

Haven't tested it yet.

 

-edit-

Most likely wont work, but what I was thinking was, setting a variable to the player when they open the give money dialog, and remove it a few seconds after it closes. If the variable is true, then it prevents the other person from trading with them until the dialog is closed.

 

-edit 2-

You might try changing... give_player_dialog.sqf to look like...

 

 
private ["_dialog"];
 
player setVariable ["TrBsy",true,0];
_dialog = createdialog "GivePlayerDialog";

call GivePlayerDialogAmounts;
waitUntil { !dialog };
uiSleep3;
player setVariable ["TrBsy",false,0];

 

then remove... both >>player setVariable ["TrBsy",true,0];<< and >>player setVariable ["TrBsy",false,0];<< from the previous script in this reply

 

Will try testing it when I can.

Share this post


Link to post
Share on other sites

Thanks for the idea, 

 

I have fixed the code, tested

 

Init.sqf

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 (!_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"];
    };
PVDZE_account_Doublecheck = [player];
publicVariableServer "PVDZE_account_Doublecheck";
player setVariable["cashMoney",_wealth - _amount, true];
_target setVariable["cashMoney",_twealth + _amount, true];


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


cutText [format["You gave %1 %2.", _amount, CurrencyName], "PLAIN DOWN"];
};

bank_dialog.sqf

private ["_dialog"];
player setVariable["TrBsy",true,0];
_dialog = createdialog "BankDialog";
call BankDialogUpdateAmounts;
waitUntil { !dialog };
uiSleep 3;
player setVariable ["TrBsy",false,0];

give_player_dialog.sqf

private ["_dialog"];player setVariable["TrBsy",true,0];
_dialog = createdialog "GivePlayerDialog";
call GivePlayerDialogAmounts;
waitUntil { !dialog };
uiSleep 3;
player setVariable ["TrBsy",false,0];

Share this post


Link to post
Share on other sites

Awesome Gr8 (Also, thanks for fixing up my typos)! but why do you attach it to the bank dialog too?

 

Also, you could remove the...

if (_wealth == _twealth) exitWith {
cutText ["FAILED : Both Targets have same amount of money.", "PLAIN DOWN"];
};

 

Since it's already covered with the variable.

Share this post


Link to post
Share on other sites

Very nice :)

 

Do I have to replace all code for bank_dialog.sqf and give_player_dialog.sqf?

Or do I have to insert this code between the existing somehow?

 

Yes, replace this code with your bank_dialog.sqf and give_player_dialog.sqf

Share this post


Link to post
Share on other sites

When I do so, the amount of money is not displayed anymore in any items which can hold coins.

 

Thats shouldnt be happening. Are you using 3.0 ZSC ?

Share this post


Link to post
Share on other sites

If you can...revert to original  bank_dialog.sqf and give_player_dialog.sqf

Then please post the contents of both files.

 

Here we go:

 

bank_dialog.sqf

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

private ["_dialog"];
ZSC_CurrentStorage = _this select 3;
_dialog = createDialog "BankDialog";
call BankDialogUpdateAmounts;

DZE_ActionInProgress = false;

 

give_player_dialog.sqf

private ["_dialog"];
ZSC_GiveMoneyTarget = cursorTarget;
if( isPlayer ZSC_GiveMoneyTarget)then{
_dialog = createdialog "GivePlayerDialog";
call GivePlayerDialogAmounts;
}else{
systemChat format["You are not looking correctly at a player"];
};

Share this post


Link to post
Share on other sites

Untested.

 

Change Bank Dialog to....

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;
player setVariable["TrBsy",true,0];

private ["_dialog"];
ZSC_CurrentStorage = _this select 3;
_dialog = createDialog "BankDialog";
call BankDialogUpdateAmounts;

DZE_ActionInProgress = false;
uiSleep 3;
player setVariable["TrBsy",false,0];

and give_Player to....

private ["_dialog"];
player setVariable["TrBsy",true,0];
uiSleep 1;
ZSC_GiveMoneyTarget = cursorTarget;
if( isPlayer ZSC_GiveMoneyTarget)then{
_dialog = createdialog "GivePlayerDialog";
call GivePlayerDialogAmounts;
}else{
systemChat format["You are not looking correctly at a player"];
};
uiSleep 3;
player setVariable["TrBsy",false,0];

Share this post


Link to post
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


  • Similar Content

    • By xTimeToShine
      Hey guys,
      i'm proud to present our new "Epic Illusion Gaming - DayZ Overpoch server".
       
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
      [EIG] DayZ Overpoch | Chernarus | 1.0.6.2 | Coins | Lift | Groups | Missions | Events | Deploy Bike |
      IP: 94.250.209.139:2302
       
      We are searching for some Players and also for some Admins. Please visit our Server or come to our Teamspeak or Discrod.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
      Visit us on ...
      ...Teamspeak:  94.250.223.10:15111
      ...Discord:  https://discord.gg/MTQuUHP
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Our new special features:
      Global Coins System Deploy a bike (Toolbox) Lift & Tow Selfbloodbagging Groupsystem Virtual Garage AI Missions Special PVP Events Custom Loadout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Upcoming features:
      Weaponswitch Enhanced Spawn Selection and much more...  
    • By Vladick
      BSBS Server IP: 207.244.146.179
      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 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


    • By chi
      Can someone tell me if im doing something wrong here? Im trying to spawn a random amount of coins on Zombies when they die.
      This is my zombie_generate.sqf and im calling it from my custom compiles. Sorry, but im on my phone and cant find a spoiler box button.
      #include "\z\addons\dayz_code\loot\Loot.hpp"
      private ["_bypass","_position","_unitTypes","_radius","_method","_agent","_maxlocalspawned","_doLoiter","_wildspawns","_maxControlledZombies",
      "_cantSee","_isOk","_zPos","__FILE__","_fov","_safeDistance","_farDistance","_xasl","_eye","_ed","_deg","_skipFOV","_wildSpawns","_tooClose",
      "_type","_loot","_array","_rnd","_lootType","_index","_weights","_loot_count","_favStance","_lootGroup"];
      _position = _this select 0;
      _doLoiter = _this select 1; // wonder around
      _unitTypes = _this select 2; // class of wanted models
      //_wildspawns = _this select 3;
      _bypass = _this select 3;
      _maxlocalspawned = round(dayz_spawnZombies);
      //Lets check if we need to divide the amount of zeds
      if (r_player_divideinvehicle > 0) then {
          _maxlocalspawned = round(dayz_spawnZombies / r_player_divideinvehicle);
      };
      _maxControlledZombies = round(dayz_maxLocalZombies);
      _cantSee = {
          private "_isOk";
          _isOk = true;
          _zPos = +(_this select 0);
          if (count _zPos < 3) exitWith {
              diag_log format["%1::_cantSee illegal pos %2", __FILE__, _zPos];
              false
          };
          _zPos = ATLtoASL _zPos;
          _fov = _this select 1; // players half field of view
          _safeDistance = _this select 2; // minimum distance. closer is wrong
          _farDistance = _this select 3; // distance further we won't check
          _zPos set [2, (_zPos select 2) + 1.7];
          {
              _xasl = getPosASL _x;
              if (_xasl distance _zPos < _farDistance) then {
                  if (_xasl distance _zPos < _safeDistance) then {
                      _isOk = false;
                  } else {
                      _eye = eyePos _x; // ASL
                      _ed = eyeDirection _x;
                      _ed = (_ed select 0) atan2 (_ed select 1);
                      _deg = [_xasl, _zPos] call BIS_fnc_dirTo;
                      _deg = (_deg - _ed + 720) % 360;
                      if (_deg > 180) then { _deg = _deg - 360; };
                      if ((abs(_deg) < _fov) && {( // in right angle sector?
                              (!(terrainIntersectASL [_zPos, _eye]) // no terrain between?
                              && {(!(lineIntersects [_zPos, _eye]))}) // and no object between?
                          )}) then {
                          _isOk = false;
                      };
                  };
              };
              if (!_isOk) exitWith {false};
          uiSleep 0.001;
          } forEach playableUnits;
          _isOk
      };
      _skipFOV = false;
      if ((_maxlocalspawned < _maxControlledZombies) && (dayz_CurrentNearByZombies < dayz_maxNearByZombies) && (dayz_currentGlobalZombies < dayz_maxGlobalZeds)) then {
          if (_bypass) then {  
              _skipFOV = true;
              _position = [_position,3,20,1] call fn_selectRandomLocation;
          };
          if (surfaceIsWater _position) exitWith { diag_log "Location is in Water Abort"; };
          if ((_skipFOV) or {([_position, 15, 10, 70] call _cantSee)}) then {
              _tooClose = {isPlayer _x} count (_position nearEntities ["CAManBase",30]) > 0;
              if (_tooClose) exitwith { diag_log "Zombie_Generate: was too close to player."; };
              
              if (count _unitTypes == 0) then {
                  _unitTypes = getArray (missionConfigFile >> "CfgLoot" >> "Buildings" >> "Default" >> "zombieClass");
              };
              
              // lets create an agent
              _type = _unitTypes call BIS_fnc_selectRandom;
              _radius = 5;
              //_method = if (_doLoiter) then {"CAN_COLLIDE"} else {"NONE"};
              _agent = createAgent [_type, _position, [], _radius, "CAN_COLLIDE"]; 
              uiSleep 0.03;
              
              //add to global counter 
              dayz_spawnZombies = dayz_spawnZombies + 1;
              dayz_CurrentNearByZombies = dayz_CurrentNearByZombies + 1;
              dayz_currentGlobalZombies = dayz_currentGlobalZombies + 1;
              
              //Add some loot
              if (0.3 > random 1) then {
                  _lootGroup = configFile >> "CfgVehicles" >> _type >> "zombieLoot";
                  if (isText _lootGroup) then {
                      //_lootGroup = dayz_lootGroups find getText (_lootGroup);
                      _lootGroup = Loot_GetGroup(getText _lootGroup);
                      //[_agent, _lootGroup, 1] call loot_insert;
                      Loot_Insert(_agent, _lootGroup, 1);
                  };
              };
              
              _agent setVariable["agentObject",_agent];
              if (!isNull _agent) then {
                  _agent setDir random 360;
                  uiSleep 0.03;
                  _position = getPosATL _agent;
                  _favStance = (
                      switch ceil(random(3^0.5)^2) do {
                          //case 3: {"DOWN"}; // prone
                          case 2: {"middle"}; // Kneel "middle"
                          default {"Up"}; // stand-up
                      }
                  );
                  _agent setUnitPos _favStance;
                  _agent setVariable ["stance", _favStance];
                  _agent setVariable ["BaseLocation", _position];
                  _agent setVariable ["doLoiter", _doLoiter]; // true: Z will be wandering, false: stay still
                  
                  _coinsRandom = random 1;
                  if (_coinsRandom <= 0.5) then {
                  _cash = round(random 20) * 5; // number between 0 and 200 Add Coins to Zombie
                  _agent setVariable["CashMoney",_cash ,true]; // Add Coins to Zombie
                  };
              };
          };
      };
       
  • Advertisement
  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Latest Donations

  • Advertisement
  • Discord

×