Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by creativv

  1. 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 .
  2. 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
  3. 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 .
  4. 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;
  5. 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
  6. 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 .
  7. solution is to make prices cheaper , there is a limit to a hive.dll . Everything over 999.999 coins will cause problems
  8. Did you cap the amount of coins they can carry or are they able to walk around with over 999999 coins ?
  9. After doing some research i find myself with finding multiple methods to run a database . What is the core difference between arma2net and 999 custom hive dll and wich should perform better ? Thanks in advance for reply's
  10. Allright well would be nice to see they dont dissapear i think this will improve servers because you can narrow down the dynamic vehicles . EDIT: Not fixed ,
  11. Same with venom . no more manual fire and guns are less movable ........ :(:(
  12. Ill install Skype Merlin i got slow working zeds for you . And i already have you in my Skype ;)
  13. Not having this issue over here Donnovan . Greetz
  14. I can run on test server if i can find some time , i have a busy job . If i find some time i will run it on test server with some friends without infistar .
  15. Just a bump to see if anyone knows why my vehicles get deleted ?
  16. Interesting to see where this will go Donnovan . Think from most people on arma 2 forum part you are the one most active trying to improve it still .
  17. Dude you are seriously reading over wat i am saying and i do not want to spend my time here to argue with you yes you have minus plastic pole , but i have more i want to be removed by owner or friend only in that array hence i seperated them . If i use your code i would have to do this if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ || StorageShed_DZ || GunRack_DZ || and so on so on ") then { because i want more stuff to removed by owner and friends only catch my drift now ?
  18. Got it to work partially with using this from modular_build if (_hasrequireditem) then { //Create object that is attached to a player (i.e Ghost preview if available) _buildObject = [_classname, _ghost, _offset, true] call player_build_create; //define items collected from function _location1 = _buildObject select 0; //array _object = _buildObject select 1; //Obj _objectHelper = _buildObject select 2; //Obj _controls = [_object, _isAllowedUnderGround, _location1, _objectHelper] call player_build_controls; //define items collected from function _cancel = _controls select 0; //bool _reason = _controls select 1; //string _position = _controls select 2; //array _dir = _controls select 3; //int _vector = _controls select 4; //array //Publish item to a database [_cancel, _position, _classnametmp,_isAllowedUnderGround, _text, _isPole, _lockable,_dir, _reason, _vector] call player_build_publish; }; The F function works but it cancels out the rest of the player_deploy . Maybe someobody with more skills then us is able to make the player_deploy call for the player_build_controls instead of using the controls from player_deploy .
  19. The code i provided is so only plotpole owners and people added on the plotpoles can remove the plotpole since a plotpole is in variables array in _isRemovable . other thent that i dont use wrecks on my server so could have deleted that the _isRemovable also has some more items in it that i use on the server , so from the moment my code is used they are only removable by owners and friends . That's why i moved the _isWreckBuilding because that contains the ammo crates in the array in variables . But your fix for plotpoles removable by owner works fine but so does mine i just seperated them to make more items removable by owners and friends only .
  20. Ive been using the same method and works fine but a little tip , if you want to use the ammoboxes (random crates with vehicle ammo) you might want to make a new line on your fn_selfactions for _isWreckBuilding . Otherwise your players wont be able to open them with a crowbar . Change your code to this if(_isDestructable || _isWreck || _isRemovable) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then { _owner = _cursorTarget getVariable ["CharacterID","0"]; _friends = _cursorTarget getVariable ["plotfriends", []]; _fuid = []; _allowed = []; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = [_owner] + _fuid; if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then [{_player_deleteBuild = true},{_player_deleteBuild = false}] }else{_player_deleteBuild = true}; }; }; And underneith add this if(_isWreckBuilding) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _player_deleteBuild = true; }; }; Also keep in mind that code for plotmanagement with p4l is different like this //Allow player to delete objects if(_isDestructable || _isWreck || _isRemovable) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0]; _IsNearPlot = count (_findNearestPoles); _fuid = []; _allowed = []; if(_IsNearPlot > 0)then{ _thePlot = _findNearestPoles select 0; _owner = _thePlot getVariable ["ownerPUID","010"]; _friends = _thePlot getVariable ["plotfriends", []]; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = [_owner] + _fuid; if ( _playerUID in _allowed && _ownerID in _allowed ) then { _player_deleteBuild = true; }; }else{ if(_ownerID == _playerUID)then{ _player_deleteBuild = true; }; }; };
  21. Doesnt work tried it already , and when copying some parts over from player_build it destroys the player_deploy
  22. Btw i tested spamming the menu on my server and i got one vehicle everytime so spamming shouldnt happen .
  • Create New...