Ghost_TLD

Check Wallet Dupe Fix

Jun 28th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.08 KB | None | 0 0
  1. private ["_body", "_hisMoney", "_myMoney", "_killsH", "_test2", "_headShots", "_test","_playeridke","_humanity"];
  2.  
  3. _body = _this select 3;
  4.  
  5. // Add This to not let players pick up over 999999
  6. _hisMoney = _body getVariable ["cashMoney",0];
  7. if(_hisMoney > 999999) exitWith {
  8.         cutText ["This player has to many coins you cant pick it up it will bug your cash", "PLAIN DOWN"];
  9.     };
  10. // Add This to not let players pick up over 999999
  11.  
  12. _PlayerNear = _body call dze_isnearest_player;
  13. if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};
  14.  
  15. _name = _body getVariable ["bodyName","unknown"];
  16. _hisMoney = _body getVariable ["cashMoney",0];
  17. _myMoney = player getVariable ["cashMoney",0];
  18. _myMoney = _myMoney + _hisMoney;
  19. _body setVariable ["cashMoney", 0 , true];
  20.  
  21. player setVariable ["cashMoney", _myMoney , true];
  22.  
  23. systemChat format ['You took %1 coins, ID says %2 !',_hisMoney,_name];
  24. sleep 2;
  25.  
  26. _cid =  player getVariable ["CharacterID","0"];
  27. _cashMoney = player getVariable ["cashMoney",0];
  28.  
  29. if(_cashMoney > 0) then{
  30.  
  31. } else {
  32.  
  33. _cashMoney = 0;
  34.  
  35. };
Advertisement
Add Comment
Please, Sign In to add comment