厉害救济 1 Report post Posted December 15, 2017 private["_payload", "_player","_request","_result","_gethasBet","_source","_Type","_reward","_curReward","_ZBnum","_AInum","_AI_Total","_ZB_Total","_text","_vehicleObject","_lockerMoney","_playerMoney","_duihuanbi"]; _payload = _this; try { _player = _payload select 0; _request = _payload select 1; _ZBnum= switch (_request) do { case "GoldtoMoney": { _duihuanbi=100000; _playerMoney = _player getVariable ["ExileLocker", 0]; _mags = magazines _player; if (magazines _player find 'goldbar' < 0) then { [_player, "toastRequest", ["SuccessTitleOnly", [format["you don not have gold bar "]]]] call ExileServer_system_network_send_to; }else{ _player removeMagazine 'goldbar'; _newplayerMoney=_playerMoney+_duihuanbi; _player setVariable ['ExileLocker',_newplayerMoney, true]; format["updateLocker:%1:%2", _newplayerMoney, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; [_player, "toastRequest", ["SuccessTitleOnly", [format["you have exchanged a goldbar"]]]] call ExileServer_system_network_send_to; }; }; Share this post Link to post Share on other sites
Pattoh 44 Report post Posted December 16, 2017 15 hours ago, 厉害救济 said: private["_payload", "_player","_request","_result","_gethasBet","_source","_Type","_reward","_curReward","_ZBnum","_AInum","_AI_Total","_ZB_Total","_text","_vehicleObject","_lockerMoney","_playerMoney","_duihuanbi"]; _payload = _this; try { _player = _payload select 0; _request = _payload select 1; _ZBnum= switch (_request) do { case "GoldtoMoney": { _duihuanbi=100000; _playerMoney = _player getVariable ["ExileLocker", 0]; _mags = magazines _player; if (magazines _player find 'goldbar' < 0) then { [_player, "toastRequest", ["SuccessTitleOnly", [format["you don not have gold bar "]]]] call ExileServer_system_network_send_to; }else{ _player removeMagazine 'goldbar'; _newplayerMoney=_playerMoney+_duihuanbi; _player setVariable ['ExileLocker',_newplayerMoney, true]; format["updateLocker:%1:%2", _newplayerMoney, getPlayerUID _player] call ExileServer_system_database_query_fireAndForget; [_player, "toastRequest", ["SuccessTitleOnly", [format["you have exchanged a goldbar"]]]] call ExileServer_system_network_send_to; }; }; try _player removeItem "goldbar"; Share this post Link to post Share on other sites