Jump to content

[Release] Vehicle Service Point (Refuel, Repair, Rearm) [Script]


Axe Cop

Recommended Posts

Axe Cop,

 

So this is where i am having my issue, for the display message, i dont see a msg at all. do you have to be in vehicle chat to see it or should you be able to see if no matter what? Oh my old server that i use to play on, now i host my own, it would pop up showing you that it was near. anyway you can help me figure out why it is not working please.

Hi, you might have to enable the radio messages in your init.sqf, don't ask me why that is needed for vehicles chat to work, but try to add this to you init.sqf:

enableRadio true;

if you don't already have that config in there.

Link to comment
Share on other sites

Hi like the comment in the config says it should take 2 seconds (or whatever value you put there) for each part to repair and not be instant.

It worked fine when I tested it and as far as I know nothing has changed in the Epoch code why it should not work anymore.

I don't have much time atm but it works for most servers, might be some problems in combinations with otehr scripts or whatever, it is really hard to say unless you play on the exact server where it doesn't work, best thing you can do is check your log files (like always, I'm really getting sick of telling that to everyone all the time because no admin ever looks in there for when something isn't working errors lol)

after doing a test, I was getting instant repair and refuel also...but then realized, its possibly because I was set to admin via admin tools. 

 

I removed my guid from adminlist in admin tools, and now timers work properly when im not set as an admin. as soon as I set myself back to an admin, its instant again.

 

Link to comment
Share on other sites

after doing a test, I was getting instant repair and refuel also...but then realized, its possibly because I was set to admin via admin tools. 

 

I removed my guid from adminlist in admin tools, and now timers work properly when im not set as an admin. as soon as I set myself back to an admin, its instant again.

 

Ok that is weird, but it clearly seems to be an issue with your admin tools. I never tested it with anything else than the default Epoch anti hacks.

But still very weird usually admins have more access and not less, but in this case I think it's not a big of a deal if admins don't have to wait? :p

Link to comment
Share on other sites

Hi AxeCop,

 

Sorry if this has been asked already but at 20 pages it's easy to miss something,

 

Is there a away with your script to limit the number of Petrol Stations this script is active for?

 

Ideally I only want to make 2 maybe 3 live?

 

Any help would be appriciated

 

Thanks

Link to comment
Share on other sites

@Britzy: in theory that is possible, but the script works not like this it has no idea where the service points are and finds them in real time when you drive close to it.

meaning is has no static list of service points so you can't limit it in the current form.. the script currently detects nearby service point by the object name (like a special house type). but it could be changed to what you want and use static positions instead. I have just designed it this way because it works on any map without a special service point list for every different map etc :)

Link to comment
Share on other sites

It's not want to work

here is my ini

/*	
	For DayZ Epoch
	//Addons Credits: dayzepoch.com adn www.team27-dayz.at.ua
*/
startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false, false];

//REALLY IMPORTANT VALUES
dayZ_instance = 12;	//The instance
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;

//disable greeting menu 
player setVariable ["BIS_noCoreConversations", true];
//disable radio messages to be heard and shown in the left lower corner of the screen
enableRadio false;
// May prevent "how are you civillian?" messages from NPC
enableSentences false;

// DayZ Epoch config
spawnShoremode = 1; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500

MaxVehicleLimit = 33000; // Default = 50
MaxDynamicDebris = 500; // Default = 100
dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 1; // Default = 30 

if(EpochNameTags)then{
DZE_ForceNameTags = true; //Force Nametags
}else{
DZE_ForceNameTagsOff = true; //Turn Nametags off
};

dayz_paraSpawn = false;

DZE_DeathMsgGlobal = true;
DZE_DeathMsgSide = true;
DZE_DeathMsgTitleText = true;

dayz_minpos = -1; 
dayz_maxpos = 16000;

dayz_sellDistance_vehicle = 90;
dayz_sellDistance_boat = 90;
dayz_sellDistance_air = 90;

dayz_maxAnimals = 5000; // Default: 8
dayz_tameDogs = true;
DynamicVehicleDamageLow = 0; // Default: 0
DynamicVehicleDamageHigh = 100; // Default: 100

DZE_PlotPole = [450,90]; //Default: [30;45]
DZE_R3F_WEIGHT = true; //Default: true
DZE_PlayerZed = false; //Default: true
DZE_ConfigTrader = true;
DZE_BuildingLimit = 100000;
DZE_BuildOnRoads = true; // Default: False
DZE_GodModeBase = true;

EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
dayz_fullMoonNights = true;

// new stuff
dayz_paraSpawn = false;

dayz_sellDistance_vehicle = 10;
dayz_sellDistance_boat = 30;
dayz_sellDistance_air = 40;

dayz_maxAnimals = 5; // Default: 8
dayz_tameDogs = true;
DynamicVehicleDamageLow = 0; // Default: 0
DynamicVehicleDamageHigh = 100; // Default: 100

DZE_BuildOnRoads = false; // Default: False

EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
dayz_fullMoonNights = true;

//Load in compiled functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";				//Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";				//Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";	//Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";				//Compile regular functions
progressLoadingScreen 0.5;
call compile preprocessFileLineNumbers "server_traders.sqf";				//Compile trader configs
progressLoadingScreen 1.0;
fnc_usec_selfActions = compile preprocessFileLineNumbers "scripts\fn_selfActions.sqf";

"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";

if (isServer) then {
	//Compile vehicle configs
	call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_12.isladuala\dynamic_vehicle.sqf";				
	// Add trader citys
	_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_12.isladuala\mission.sqf";
	_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_12.isladuala\police_pack.sqf";
    _nil = [] execVM "service_point\service_point.sqf";
	
	_serverMonitor = 	[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};

if (!isDedicated) then {
    // ... some other stuff ...
    // add the next line somewhere in this block
    execVM "service_point\service_point.sqf";
};

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";	
	
	//anti Hack
	[] execVM "\z\addons\dayz_code\system\antihack.sqf";

	//Lights
	//[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
};
#include "\z\addons\dayz_code\system\REsec.sqf"
//Start Dynamic Weather
execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";

[] execVM "admintools\Activate.sqf";

[] ExecVM "Scripts\loadout.sqf";

//watermark
p2_water = compile preprocessFileLineNumbers "p2.sqf";
player spawn p2_water;

	//Radio
	_nul = [] execVM "DZAI_Client\dzai_initclient.sqf";

[] execVM "Scripts\szone.sqf";

[] execVM "service_point\ac_functions.sqf";

[] execVM "Police_pack.sqf"

#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf"

Link to comment
Share on other sites

lol what did you do? copy my script in 3 places and do some weird stuff.. that's new :D

I guess you don't understand English very good so I hope you get this:

you onyl have to add 1 line to your init.sqf:

execVM "service_point\service_point.sqf";

nothing else.

 

you can put it after the line

[] execVM "\z\addons\dayz_code\system\antihack.sqf";

Hope that helps

 

 

please do not start my ac_functions script or anything in there, like your did here

[] execVM "service_point\ac_functions.sqf";

remove that :D

also in the latest version that file does not even exist anymore so where you get that from? :D

Link to comment
Share on other sites

Hi. First time poster. Btw, thanks to all for their work. It really helps nubs like me.

 

I do have an issue. Everything seems to be working well (forgive me if this has been asked, I did try to look) but when I rearm a vehicle at a service point (AH1Z for example) it allows me to rearm all the weapons but when I cycle back through them only the last weapon I rearmed  is full. The others are empty again. It doesn't matter how I do it, the result is always the same. Only one weapon is rearmed at a time. I've swapped positions. Restarted the chopper... whatever I could thinking it would stick but it doesnt.

 

Any thoughts on that?

Thanks in adavance. And, I am kind of a noob at this and I don't know code but I'm learnign thanks to you all.

Link to comment
Share on other sites

Hmm I've never heard of that bug before, but as I've said many times I only tested the script with default Epoch vehicles and it works for the armed choppers with more than 1 weapon attached!?

Maybe someone else can tell you more, there are some admins around here who use more military vehicles they should know.

Link to comment
Share on other sites

It seems that the bug is localized to vehicles that I spawn in with admin tools. I've tried it with tanks, helis etc. Anything with more than one weapon doesnt rearm correctly. I bought a UH1Y from a trader and although it has the rocket pods, I can't select the hydras as an option. I think I read somewhere that Epoch removed the hydra option but I'm not sure. That's a bummer. Maybe I can figure out how to change that. Since I can't switch weapons with a trader heli I can't test the rearm on a purchased epoch vehicle.

 

It's possible that I have something configured wrong. It wouldn't be the first time.

 

Thanks for the reply, Axe Cop.

Maybe someone has a solution.

Link to comment
Share on other sites

Is it possible to set fuel capacities on the pumps and tanks.

 

Tank holds 100,000 litres of fuel

 

Pump holds 50,000 litres of fuel

 

When someone takes fuel from either, It reduces the amount.

 

When empty they fill back up on server restart.

Link to comment
Share on other sites

With the change to be able to rearm planes from the driver seat it now allows you to "Rearm Horn" is there a way to blacklist the horn?

Weird, but I don't think that can easily be blacklisted because the "horn" is like a weapon in teh ArmA engine. Maybe one reason why the ream didn't work for the driver seat in the first place, but idk why someone wants to rearm the horn... :p

 

 

Is it possible to set fuel capacities on the pumps and tanks.

 

Tank holds 100,000 litres of fuel

 

Pump holds 50,000 litres of fuel

 

When someone takes fuel from either, It reduces the amount.

 

When empty they fill back up on server restart.

I don't think that is easily done, because the amount of fuel is not accessible from the script I think, only a percentage value.

I mean if a vehicle is being refueled the script can not add an amount of 100 litres or something but only 1% for example. Maybe there is a way but I don't know.

Link to comment
Share on other sites

Hi AxeCop,

 

Sorry if this has been asked already but at 20 pages it's easy to miss something,

 

Is there a away with your script to limit the number of Petrol Stations this script is active for?

 

Ideally I only want to make 2 maybe 3 live?

 

Any help would be appriciated

 

Thanks

Use the editor and add a unique item near the fuel stations you want to work with this script, say a green oil barrel etc

Then set the script to require a green oil barrel to refuel :) that'll work

Link to comment
Share on other sites

Use the editor and add a unique item near the fuel stations you want to work with this script, say a green oil barrel etc

Then set the script to require a green oil barrel to refuel :) that'll work

Yeah that will work, you could also change the script to use a list of locations instead of an object class.

It should only be a few changes if you know some Arma script. :)

Link to comment
Share on other sites

Weird, but I don't think that can easily be blacklisted because the "horn" is like a weapon in teh ArmA engine. Maybe one reason why the ream didn't work for the driver seat in the first place, but idk why someone wants to rearm the horn... :P

 

 

I don't think that is easily done, because the amount of fuel is not accessible from the script I think, only a percentage value.

I mean if a vehicle is being refueled the script can not add an amount of 100 litres or something but only 1% for example. Maybe there is a way but I don't know.

 

You dont need to ban horn, just disable rearming if driver.

In service_point.sqf, find

if ((_role call _fnc_isArmed) && (count SP_rearm_actions == 0) && _rearm_enable) then {

and replace it with

if ((assignedDriver _vehicle != player) && (_role call _fnc_isArmed) && (count SP_rearm_actions == 0) && _rearm_enable) then {

and voila!

No more rearm horn.

Link to comment
Share on other sites

@fshow sorry but I had had to LOL at your post, because the whole point of this was that driver weapon can be reamed now, if you add this then my addition is pointless and you can just remove that instead of adding a double check what I just enabled.. :D

Check the last page here or something there is a discussion and fix, before that you could never ream in the driver seat but it seems many admins use custom vehicles wither turrets in the driver seat so I "had to" enable it.

Link to comment
Share on other sites

@fshow sorry but I had had to LOL at your post, because the whole point of this was that driver weapon can be reamed now, if you add this then my addition is pointless and you can just remove that instead of adding a double check what I just enabled.. :D

Check the last page here or something there is a discussion and fix, before that you could never ream in the driver seat but it seems many admins use custom vehicles wither turrets in the driver seat so I "had to" enable it.

 

Haha, didnt get that :D I just added this script recently, and got many remarks about the rearm horn thing, so i googled it and found that question and your answer. ;)

So i made a fix, since i dont have any vehicles on my server (that i can think of atm atleast) who have driver weapons, so this fix fits me perfectly! :)

 

And it wasnt really my intention that you should add this to the script itself, just information to people who want to disable it, like me. :)

Link to comment
Share on other sites

could you add the defalt arma vehical stations to this so thay work aswell ? and can you make the gold so it grabs from oz stacks like vendros do its anoying to unpack 2 single golds to pay

I am not really working on this script anymore (or Epoch in general for that matter), you can do that yourself and publish it if you want,, sorry but I don't have time to continue doing this, Epoch scripts is much work and I just made those for my own server and published it here for other to use really.. but my scripts are all open source so anyone can modify them or whatever they want. :)

Link to comment
Share on other sites

Great job Axe! yet again.

 

One thing if someone can help me? How would i stop a vehicle from not being able to rearm? I am trying to get the KA-60 not rearm-able as it is OP?

 

Thanks

 

service_point.sqf:

_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
];

If you want all helicopters to be re-armable except the Ka-60, I think you'll need to define the cost for all other choppers here, and remove the "Air" entry above.

 

edit: I'm guessing Ka-60 falls under "AllVehicles" as well...in which case you'd need to define costs for ground vehicles too (and remove "AllVehicles" above). Maybe there's a simpler way of doing this, not sure.

Link to comment
Share on other sites

the simple way is to set a very high cost for the KA-60, off course you could also black list the vehicle but that feature is not included in the default script... :)

I think I have shared a snipped on how to black list vehicles, just search this topic it is only 2 lines of code or something.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...