BirthdayBear Posted November 27, 2013 Report Share Posted November 27, 2013 On 11/26/2013 at 11:49 PM, Axe Cop said: Check your report file on the client if there are errors. (file locationif you don't know where it is on your PC http://community.bistudio.com/wiki/Crash_Files#ARMA_2_OA) As I've said before it should work on all maps as long as the fuel stations are the same (should be), the default config is looking for these fuel feed station things ("Land_A_FuelStation_Feed"): http://media.moddb.com/images/mods/1/18/17487/preview1.jpg ( the 4 small ones between the station, that's why also the small gas stations should work as there are 1 or 2 of those, too) I looked at a few other mission files from servers using the same mod, and it appears you have to add different options for the refuel stations on this map. _servicePointClasses = ["Land_A_FuelStation_Feed","Land_Ind_TankSmall","Land_Ind_TankSmall2","Land_Fuel_tank_big","Land_A_FuelStation_Build","Land_Ind_TankSmall2_EP1"]; // service point classes The above code appears to work, cheers! Link to comment Share on other sites More sharing options...
Sukkaed Posted November 27, 2013 Report Share Posted November 27, 2013 On 11/26/2013 at 7:41 PM, sparrow8332 said: what antihax you using ? Infistar. What is the actual s_player action that is used for scroll menus? I tried these _refuel_action, _repair_action, _rearm_actions but no luck. Link to comment Share on other sites More sharing options...
Axe Cop Posted November 27, 2013 Author Report Share Posted November 27, 2013 On 11/27/2013 at 4:26 AM, Sukkaed said: Infistar. What is the actual s_player action that is used for scroll menus? I tried these _refuel_action, _repair_action, _rearm_actions but no luck. That may be because the actions are private to my script only, I am not sure how that works with the antihack tools but my actions are not accessible from any other scripts so you may have problems adding it to infistar. One solution would be to make the actions global, this is not nessesary for the script but may help you whitelisting the actions I think: change "_refuel_action" to "s_player_refuel_action" in the script (for the other actions as well, just search and replace all) that will make them global and you should be able to add them, you have to remove them in the "private" block above, change private ["_folder","_servicePointClasses","_maxDistance","_actionTitleFormat","_actionCostsFormat","_costsFree","_message","_messageShown","_refuel_enable","_refuel_costs","_refuel_updateInterval","_refuel_amount","_repair_enable","_repair_costs","_repair_repairTime","_rearm_enable","_rearm_costs","_rearm_magazineCount","_lastVehicle","_lastRole","_refuel_action","_repair_action","_rearm_actions","_fnc_removeActions","_fnc_getCosts","_fnc_actionTitle","_fnc_isArmed","_fnc_getWeapons"]; to private ["_folder","_servicePointClasses","_maxDistance","_actionTitleFormat","_actionCostsFormat","_costsFree","_message","_messageShown","_refuel_enable","_refuel_costs","_refuel_updateInterval","_refuel_amount","_repair_enable","_repair_costs","_repair_repairTime","_rearm_enable","_rearm_costs","_rearm_magazineCount","_lastVehicle","_lastRole","_fnc_removeActions","_fnc_getCosts","_fnc_actionTitle","_fnc_isArmed","_fnc_getWeapons"]; so just remove the actions ("_refuel_action","_repair_action","_rearm_actions") from that list and change the name to something without the "_" at the beginning should do it. Btw I'm wondering how that would add a protection from a hacker, if you just use a variable name like that in your "hack" it won't protect anything I guess lol (but then again most hackers don't know what they are doing, you are lucky I don't develop hacks haha) Link to comment Share on other sites More sharing options...
Fuchs Posted November 27, 2013 Report Share Posted November 27, 2013 hi all again axe cop what code do i need to whitelist it for infistar's antihack ? danke/thx fuchs ! Link to comment Share on other sites More sharing options...
Axe Cop Posted November 27, 2013 Author Report Share Posted November 27, 2013 On 11/27/2013 at 4:46 PM, Fuchs said: hi all again axe cop what code do i need to whitelist it for infistar's antihack ? danke/thx fuchs ! check my post above yours maybe? I think that is the answer is it not? I'm not sure since i don't have access to infistar. Link to comment Share on other sites More sharing options...
Fuchs Posted November 27, 2013 Report Share Posted November 27, 2013 sry man had not seen it was on the way home in the bus using my SGS2 :D Link to comment Share on other sites More sharing options...
W4lly Posted November 28, 2013 Report Share Posted November 28, 2013 in my server with the antihack provided by survivalservers.com which is the same (infistar antihack) works without changing anything on Taviana map tnx Axe great script ! Link to comment Share on other sites More sharing options...
Fuchs Posted November 28, 2013 Report Share Posted November 28, 2013 Hm wired .cause our players cant access it,only admins .also infistar has no solution yet. Link to comment Share on other sites More sharing options...
W4lly Posted November 28, 2013 Report Share Posted November 28, 2013 On 11/28/2013 at 8:19 AM, Fuchs said: Hm wired .cause our players cant access it,only admins .also infistar has no solution yet. i tried now as normal player for me work fine with antihack ... u can try in my taviana server Link to comment Share on other sites More sharing options...
Axe Cop Posted November 28, 2013 Author Report Share Posted November 28, 2013 On 11/28/2013 at 11:40 AM, W4lly said: i tried now as normal player for me work fine with antihack ... u can try in my taviana server Maybe they have disabled the menu protection in the antihacks, who knows.. anyway if you follow my instructions above it should work with infistar Link to comment Share on other sites More sharing options...
Fuchs Posted November 28, 2013 Report Share Posted November 28, 2013 Menu protection? We have antihack active since monday... Will try and error when at home Link to comment Share on other sites More sharing options...
Axe Cop Posted November 28, 2013 Author Report Share Posted November 28, 2013 On 11/28/2013 at 3:44 PM, Fuchs said: Menu protection? Well as I've said I don't have access to infistar but seems it has menu protection so hackers can't just open their hack menu, that's why you have to whitelist custom menus like the 3 actions is my script.. Link to comment Share on other sites More sharing options...
Fuchs Posted November 28, 2013 Report Share Posted November 28, 2013 private ["_folder","_servicePointClasses","_maxDistance","_actionTitleFormat","_actionCostsFormat","_costsFree","_message","_messageShown","_refuel_enable","_refuel_costs","_refuel_updateInterval","_refuel_amount","_repair_enable","_repair_costs","_repair_repairTime","_rearm_enable","_rearm_costs","_rearm_magazineCount","_lastVehicle","_lastRole","_fnc_removeActions","_fnc_getCosts","_fnc_actionTitle","_fnc_isArmed","_fnc_getWeapons"]; so just remove the actions ("_refuel_action","_repair_action","_rearm_actions") from that list and change the name to something without the "_" at the beginning should do it. so should i remove them and readd/rename them without "_" at the beginning correct? or mabe it's the fact we use the first release for this script? Link to comment Share on other sites More sharing options...
Axe Cop Posted November 28, 2013 Author Report Share Posted November 28, 2013 I don't think that changed in the second release but why not upgrade to the newest version? :D All you have to do is make those actions global, because if they are privat to the script the antihack can't find them I guess.. So you have to remove them from the private variable list and rename all variables so they become global (all variables starting with "_" are private in ArmA script, so just change it to something else not starting with "_"). if you want leave the old names in the "private" block at the top, it doesn't matter but they are not needed anymore so you should remove them. Link to comment Share on other sites More sharing options...
Fuchs Posted November 28, 2013 Report Share Posted November 28, 2013 ah ok now i understood ! Thx man! narf... Link to comment Share on other sites More sharing options...
Jaroo Posted November 28, 2013 Report Share Posted November 28, 2013 does not work on my map Panthera I must add special name for fuel obj ? somebody know list name all fuel station in panthera ? Pls help me I go to missions/epoch.panthera/and here create new folde ;service_point; and inside i create 5files sqf from download link up File Manager > \vilayercodecustom\missions\epoch.panthera\service_point and next step i go to \init.sqf and add comand like that if (!isDedicated) then { //Conduct map operations 0 fadeSound 0; waitUntil {!isNil "dayz_loadScreenMsg"}; dayz_loadScreenMsg = (localize "STR_AUTHENTICATING"); //Run the player monitor _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf"; //Lights //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; //Custom Loadouts [] ExecVM "Scripts\loadout.sqf"; execVM "service_point\ac_functions.sqf"; execVM "service_point\service_point.sqf"; execVM "service_point\service_point_rearm.sqf"; execVM "service_point\service_point_refuel.sqf"; execVM "service_point\service_point_repair.sqf"; Its 5last comand add its okay or i must change somethink Link to comment Share on other sites More sharing options...
Axe Cop Posted November 28, 2013 Author Report Share Posted November 28, 2013 You only need to add the "service_point.sqf" to your init.sqf, also put it below the "light" stuff so it wont be executed on the server. About the gas stations idk, but there was another post on this forum where somebody said something about the class type, or just find it out yourself, i have an admin tool that just tells me the object name by looking at it :p Jaroo 1 Link to comment Share on other sites More sharing options...
Jaroo Posted November 28, 2013 Report Share Posted November 28, 2013 what do you mean, ---also put it below the "light" stuff so it wont be executed on the server. i must put this code somewhere else? execVM "service_point\service_point.sqf"; Link to comment Share on other sites More sharing options...
Bags2247 Posted November 28, 2013 Report Share Posted November 28, 2013 Make it look like this //Lights //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; }; //Custom Loadouts [] ExecVM "Scripts\loadout.sqf"; //Service point by Axe Cop [] execVM "service_point\service_point.sqf"; It works on mine, I just removed some of my stuff, that you don't have there Bags Link to comment Share on other sites More sharing options...
Jaroo Posted November 28, 2013 Report Share Posted November 28, 2013 Im paste this code but not working when im in petrol station and scrolls mouse I have only red option need power :( never make it this:( Link to comment Share on other sites More sharing options...
Bags2247 Posted November 28, 2013 Report Share Posted November 28, 2013 I wonder if you have the config set-up right now to allow most petrol stations to do it Can you show me the configuarable part of the service_point.sqf and I'll try to help Bags Jaroo 1 Link to comment Share on other sites More sharing options...
Jaroo Posted November 28, 2013 Report Share Posted November 28, 2013 // Vehicle Service Point by Axe Cop private ["_folder","_servicePointClasses","_maxDistance","_actionTitleFormat","_actionCostsFormat","_costsFree","_message","_messageShown","_refuel_enable","_refuel_costs","_refuel_updateInterval","_refuel_amount","_repair_enable","_repair_costs","_repair_repairTime","_rearm_enable","_rearm_costs","_rearm_magazineCount","_lastVehicle","_lastRole","_refuel_action","_repair_action","_rearm_actions","_fnc_removeActions","_fnc_getCosts","_fnc_actionTitle","_fnc_isArmed","_fnc_getWeapons"]; // ---------------- CONFIG START ---------------- // general settings _folder = "service_point\"; // folder where the service point scripts are saved, relative to the mission file _servicePointClasses = ["Land_A_FuelStation_Feed"]; // service point classes (add "FuelPump_DZ" to use the dynamic Epoch fuel pumps) _maxDistance = 10; // maximum distance from a service point for the options to be shown _actionTitleFormat = "%1 (%2)"; // text of the vehicle menu, %1 = action name (Refuel, Repair, Rearm), %2 = costs (see format below) _actionCostsFormat = "%2 %1"; // %1 = item name, %2 = item count _costsFree = "free"; // text for no costs _message = "Vehicle Service Point nearby"; // message to be shown when in range of a service point (set to "" to disable) // refuel settings _refuel_enable = true; // enable or disable the refuel option _refuel_costs = []; // free for all vehicles (equal to [["AllVehicles",[]]]) _refuel_updateInterval = 0.5; // update interval (in seconds) _refuel_amount = 0.02; // amount of fuel to add with every update (in percent) // repair settings _repair_enable = true; // enable or disable the repair option _repair_costs = [ ["Air",["ItemGoldBar",5]], // 5 Gold for helicopters and planes ["AllVehicles",["ItemGoldBar",2]] // 2 Gold for all other vehicles ]; _repair_repairTime = 2; // time needed to repair each damaged part (in seconds) // rearm settings _rearm_enable = true; // enable or disable the rearm option _rearm_costs = [ ["ArmoredSUV_PMC_DZE",["ItemGoldBar10oz",2]], // special costs for a single vehicle type ["Air",["ItemGoldBar10oz",2]], // 2 10oz Gold for helicopters and planes ["AllVehicles",["ItemGoldBar10oz",1]] // 1 10oz Gold for all other vehicles ]; _rearm_magazineCount = 3; // amount of magazines to be added to the vehicle weapon // ----------------- CONFIG END ----------------- call compile preprocessFileLineNumbers (_folder + "ac_functions.sqf"); _lastVehicle = objNull; _lastRole = []; _refuel_action = -1; _repair_action = -1; _rearm_actions = []; _messageShown = false; _fnc_removeActions = { if (isNull _lastVehicle) exitWith {}; _lastVehicle removeAction _refuel_action; _refuel_action = -1; _lastVehicle removeAction _repair_action; _repair_action = -1; { _lastVehicle removeAction _x; } forEach _rearm_actions; _rearm_actions = []; _lastVehicle = objNull; _lastRole = []; }; _fnc_getCosts = { private ["_vehicle","_costs","_cost"]; _vehicle = _this select 0; _costs = _this select 1; _cost = []; { private "_typeName"; _typeName = _x select 0; if (_vehicle isKindOf _typeName) exitWith { _cost = _x select 1; }; } forEach _costs; _cost }; _fnc_actionTitle = { private ["_actionName","_costs","_costsText","_actionTitle"]; _actionName = _this select 0; _costs = _this select 1; _costsText = _costsFree; if (count _costs == 2) then { private ["_itemName","_itemCount","_displayName"]; _itemName = _costs select 0; _itemCount = _costs select 1; _displayName = getText (configFile >> "CfgMagazines" >> _itemName >> "displayName"); _costsText = format [_actionCostsFormat, _displayName, _itemCount]; }; _actionTitle = format [_actionTitleFormat, _actionName, _costsText]; _actionTitle }; _fnc_isArmed = { private ["_role","_armed"]; _role = _this; _armed = count _role > 1; _armed }; _fnc_getWeapons = { private ["_vehicle","_role","_weapons"]; _vehicle = _this select 0; _role = _this select 1; _weapons = []; if (count _role > 1) then { private ["_turret","_weaponsTurret"]; _turret = _role select 1; _weaponsTurret = _vehicle weaponsTurret _turret; { private "_weaponName"; _weaponName = getText (configFile >> "CfgWeapons" >> _x >> "displayName"); _weapons set [count _weapons, [_x, _weaponName, _turret]]; } forEach _weaponsTurret; }; _weapons }; while {true} do { private ["_vehicle","_inVehicle"]; _vehicle = vehicle player; _inVehicle = _vehicle != player; if (local _vehicle && _inVehicle) then { private ["_pos","_objects","_inRange"]; _pos = position _vehicle; _objects = nearestObjects [_pos, _servicePointClasses, _maxDistance]; _inRange = count _objects > 0; if (_inRange) then { private ["_role","_actionCondition","_costs","_actionTitle"]; _role = assignedVehicleRole player; if (((str _role) != (str _lastRole)) || (_vehicle != _lastVehicle)) then { // vehicle or seat changed call _fnc_removeActions; }; _lastVehicle = _vehicle; _lastRole = _role; _actionCondition = "vehicle _this == _target && local _target"; if (_refuel_action < 0 && _refuel_enable) then { _costs = [_vehicle, _refuel_costs] call _fnc_getCosts; _actionTitle = ["Refuel", _costs] call _fnc_actionTitle; _refuel_action = _vehicle addAction [_actionTitle, _folder + "service_point_refuel.sqf", [_costs, _refuel_updateInterval, _refuel_amount], -1, false, true, "", _actionCondition]; }; if (_repair_action < 0 && _repair_enable) then { _costs = [_vehicle, _repair_costs] call _fnc_getCosts; _actionTitle = ["Repair", _costs] call _fnc_actionTitle; _repair_action = _vehicle addAction [_actionTitle, _folder + "service_point_repair.sqf", [_costs, _repair_repairTime], -1, false, true, "", _actionCondition]; }; if ((_role call _fnc_isArmed) && (count _rearm_actions == 0) && _rearm_enable) then { private ["_weapons"]; _costs = [_vehicle, _rearm_costs] call _fnc_getCosts; _weapons = [_vehicle, _role] call _fnc_getWeapons; { private ["_weaponName","_rearm_action"]; _weaponName = _x select 1; _actionTitle = [format["Rearm %1", _weaponName], _costs] call _fnc_actionTitle; _rearm_action = _vehicle addAction [_actionTitle, _folder + "service_point_rearm.sqf", [_costs, _rearm_magazineCount, _x], -1, false, true, "", _actionCondition]; _rearm_actions set [count _rearm_actions, _rearm_action]; } forEach _weapons; }; if (!_messageShown && _message != "") then { _messageShown = true; _vehicle vehicleChat _message; }; } else { call _fnc_removeActions; _messageShown = false; }; } else { call _fnc_removeActions; _messageShown = false; }; sleep 2; }; Link to comment Share on other sites More sharing options...
Bags2247 Posted November 28, 2013 Report Share Posted November 28, 2013 ok , yeah... What i did was uploaded my service_point.sqf to dropbox and you can D/L it from there... Here is the link https://www.dropbox.com/s/92c5cxvez7lothk/service_point.sqf It works on my server, all you will need to do is, if you want, change the amount of gold it costs to repair things, mine is set to cost a BC for air vehicles and 5 10oz gold for everything else and enable re-arm if you want it...I don't have it enabled on mine, currently Bags Link to comment Share on other sites More sharing options...
Jaroo Posted November 28, 2013 Report Share Posted November 28, 2013 im replace this files and not working Im used epoch panthera maybe I must change something, you used chernarus Link to comment Share on other sites More sharing options...
Axe Cop Posted November 29, 2013 Author Report Share Posted November 29, 2013 Thanks bags, but can it be that hard to find out what the gas stations on panthera are called? You can open the map in the arma editor to see the object names i think, i cant do everthing myself :p As i have said some hours ago it was here somewhere in the forums, try this: "Land_benzina_schnell" as the service point class http://dayzepoch.com/forum/index.php?/topic/3469-auto-refueling-on-panthera/?hl=schnell Jaroo 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now