Dodo 10 Report post Posted September 12, 2015 Hi, I'm trying the Rearm script of Arma 2/3 Epoch to modify for Exile. My problem is that no money will be deducted from the account. Anyone have any idea what is wrong? Would be nice if you can help me. (This is the service_point_rearm.sqf) http://epochmod.com/forum/index.php?/topic/34454-repair-rearming-script/// Vehicle Service Point (Rearm) by Axe Cop // reworked for a3 epoch by Halv private ["_sessionID","_vehicle","_args","_servicePoint","_costs","_magazineCount","_weapon","_type","_name","_weaponType","_weaponName","_turret","_magazines","_ammo","_playerObject","_money","_wallet"]; _vehicle = _this select 0; _args = _this select 3; _servicePoint = _args select 0; _costs = _args select 1; _weapon = _args select 2; _type = typeOf _vehicle; _name = getText(configFile >> "cfgVehicles" >> _type >> "displayName"); _weaponName = _weapon select 0; _ammoClass = _weapon select 1; _ammoName = _weapon select 2; _ammoMAX = _weapon select 3; _ammoMIN = _weapon select 4; _turret = _weapon select 5; //////////////////////////////////////////////////////////////////// _wallet = ExileClientPlayerMoney; _sessionID = _this select 0; _playerObject = _sessionID call ExileServer_system_session_getPlayerObject; _money = _playerObject getVariable ["ExileMoney", 0]; //////////////////////////////////////////////////////////////////// //if (!local _vehicle) exitWith {cutText [format["%2 is not local to %1 - Re-Arm Denied!",name player, _name], "PLAIN DOWN"]; diag_log format["Error: called service_point_rearm.sqf with non-local vehicle: %1", _vehicle] }; //if(count (crew _vehicle) > 1) exitWith {cutText ["All Passengers Must Exit Vehicle - Re-Arm Denied!", "PLAIN DOWN"];}; if (_wallet < _costs) exitWith {cutText [format["You need %1 Poptab to re-arm %2",_costs,_name], "PLAIN DOWN"];}; _currentmags = magazines _vehicle; _magscount = count _currentmags; _ammocount = {_ammoClass == _x}count _currentmags; if(_magscount > _ammoMAX)exitWith{cutText [format["You already have %1 magazine(s) in %2",_magscount,_weaponName], "PLAIN DOWN"];}; if(_ammocount > _ammoMIN)exitWith{cutText [format["You already have %1 magazine(s) of %2 in %3\nTotal of %4 magazine(s)",_ammocount,_ammoName,_weaponName,_magscount], "PLAIN DOWN"];}; //////////////////////////////////////////////////////////////////// _money = _money - _costs; _playerObject setVariable ["ExileMoney",_money]; format["setAccountMoney:%1:%2", _money, (getPlayerUID _playerObject)] call ExileServer_system_database_query_fireAndForget; //////////////////////////////////////////////////////////////////// // add a magazines _vehicle addMagazineTurret [_ammoClass, _turret]; cutText [format["%1 of %2 Rearmed", _weaponName, _name], "PLAIN DOWN"]; //cutText [format["%1 of %2 Rearmed ---- PO %3 MONEY %4 SECCION %5", _weaponName, _name, _playerObject , _money, _sessionID], "PLAIN DOWN"];If I let the whole show me with the last line is PO = any , MONEY = scalar NaN , SECCION = MyIngameName. mfg Dodo Share this post Link to post Share on other sites
Defent 244 Report post Posted September 12, 2015 You may want to ask for their permission first, before posting and modifying it here. That aside, check here if you want info on how to hadle giving and getting money variable:https://github.com/Defent/DMS_Exile/blob/master/%40ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf#L125 Share this post Link to post Share on other sites
Weeks [15thMEU(SOC)] 6 Report post Posted September 13, 2015 I've got the Generic Vehicle Service (gvs) script working on my server, if you'd like a copy. Share this post Link to post Share on other sites
READTHESCROLL 203 Report post Posted September 13, 2015 I've got the Generic Vehicle Service (gvs) script working on my server, if you'd like a copy.I'd be down to try it out Share this post Link to post Share on other sites
TMHackSaW 63 Report post Posted September 13, 2015 I'd be down to try it out +1 Share this post Link to post Share on other sites
Screamer 26 Report post Posted September 14, 2015 +1 Share this post Link to post Share on other sites
#fukk!.n0yz! 1 Report post Posted September 14, 2015 +1 Share this post Link to post Share on other sites
Weeks [15thMEU(SOC)] 6 Report post Posted September 15, 2015 https://drive.google.com/file/d/0B12d7pN50GtMSnRSTDJwTkt2aWM/view?usp=sharingThere's the link for the gvs.zip. The init.sqf and description.ext are just excerpts from mine that concern gvs. Find a home for that code in your existing files. In particular, you may have to copy & paste the internal class definitions in RscTitles to the one in yours. There can only be one RscTitles definition among the code for the map, so if there's other definitions of it, just merge them.The delay for this version of gvs is set to 10 seconds to allow for multiple people using the pads one after another. 1 Share this post Link to post Share on other sites
ExEkiller 6 Report post Posted September 15, 2015 @Weeks [15thMEU(SOC)] how does this script do I have somewhere a set trigger or a marker on the map and have to pay the player for the recharge and Resupply Share this post Link to post Share on other sites
Weeks [15thMEU(SOC)] 6 Report post Posted September 15, 2015 Just like the old GVS script, place hidden markers on the map "gvs_hel_0" for helicopters, "gvs_pla_0" for planes, "gvs_veh_0" for vehicles. Increment the number at the end for each marker (of each type... so you can have all three of those on the same map, but another helicopter rearm point would be "gvs_hel_1")Helps to also place things like a helipad or parachute jumper target on the ground so people have a visual reference for where the rearm pad is.Note that this rearm & refuel doesn't COST anything right now. If you want to add that, feel free to edit the script. Share this post Link to post Share on other sites