Jump to content

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


Axe Cop

Recommended Posts

@BigDaddy: du hast wahrscheinlich eine alte Epoch version, wie ich schon mit 3x in dem Topic geschrieben habe ist die aktuelle Version vm Skript nur für Epoch ab version 1.0.4 gedacht und wenn du noch eine alte hast kostet das reparieren nichts (weil das in Epoch fehlt).

Wegen dem automatsichem reparieren, das ist ein bekannter bug von ArmA/Epoch, kann ich nichts machen und wieß nicht genau woran es liegt aber nicht an meinem Script. (liegt oft am Fahrzeug selber, evtl nutzt du keine ordentlichen Fahrzeuge von ArmA?)

Link to comment
Share on other sites

Auszug aus der Epoch SQL

 

INSERT INTO `Traders_DATA` VALUES(5285, '["VWGolf",2]', 7, '[3,"ItemGoldBar",1]', '[2,"ItemGoldBar",1]', 0, 520, 'trade_any_vehicle');

 

also ein auto das mit Epoch kommt 

ok ist dann neu hab die letzten versionen nicht gespielt, trotzdem ist es kein ARmA auto und hat deswegen nicht unbedingt die kompletten repair teile, ist jetzt schwer zu erklären und hab leider keine Zeit, also musste selber rausfinden ich zock seit Monaten kein Epoch mehr und mach hier nur support etwas.

Link to comment
Share on other sites

Muss mich entschuldigen war mein Fehler. Da ich zum testen mein Admintool an hatte hat es das Script durcheinander gebracht und verursachte das Problem. 

 

Warum spielst du kein Epoch mehr?

Ja hab mir schon sowas gedacht aber ist leider schwer zu sagen, außerdem besser english reden hier versteht sonst keiner :D

warum ich nicht mehr spiele, schwer zu sagen ich hatte paar monate einen server davor habe ich bereits über 1 jahr epoch gespielt, einfach keine lust mehr gehabt und es gibt so viele andere games und sachen ich habe keine zeit alles zu tun leider :/

Link to comment
Share on other sites

  • 2 weeks later...

Axe Cop!!! You are awesome, great script! I was wondering, on my server you have to take gold out of the suitcase to pay for rearm, or repairs. Is there a fix do that it will auto deduct from suitcase like traders?

Hey I don't think there is "fix" for that yet, but this is more because Epoch uses its own currency stuff and no other scripts have direct access to it I think.. maybe they fix that in the EPoch code I don't like to copy over the Epoch files to my scripts only for this feature :/

Link to comment
Share on other sites

Short Version:  I want the script to display different options when looking at the fuel pump, based on either humanity, or UID..

 

Reason:  I would like to thank the servers donators by having the perk of being able to use the rearm functions of the fuel tanks..  as of right now i have it so my players are limited to just refueling.. And i would also like to have the repair function available if the humanity is a certain #

 

Sorry, this thread is now 17 pages long so if the answer is in here.. IM SORRY!  just say its been answered and ill weed thru the thread to find it..

 

EDIT: I always forget the search bar.. i searched "humanity" and i see the answer.  searching for the UID answer now

 

How would I go about making it so you have to have a set humanity level to be able to use this.. say + or - 15k a an example.

You can just use this to get the humanity of the current player:

player getVariable["humanity",0];

 

as simple as that, do a condition for the required humanity like:

 

if (abs player getVariable["humanity",0] >= 15000) then {
// do something
};

 

can you dumb down this answer just a little.. its been a year since ive had servers.

would that be added in here? and if so, where exactly?

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;
Link to comment
Share on other sites

hey, I don't think somebody asked that before so it's not answered yet :D

 

anyway since this script is running on the client (every players computer for themselves) it should be fairly easy to add something like different options based on humanity levels.

you could just add a simple humanity check for the options you want to show (or not show), if you have no clue about ArmA script I can help you but then I need some specifics first :D

Link to comment
Share on other sites

Hey sorry didn't see your edit and yes I remember there was a question about humanity... If you need more details I can help you tomorrow, because I am not near my computer atm and it's almost impossible to write code from an mobile device lol, sorry

Link to comment
Share on other sites

Ok here is what you can do:

at line 150 https://github.com/vos/dayz/blob/master/service_point/service_point.sqf#L150 you can simply add a condition to access the rearm option:

change

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

to

if ((player getVariable["humanity",0] > 10000) && (_role call _fnc_isArmed) && (count SP_rearm_actions == 0) && _rearm_enable) then {

in that example only players with humanity > 10000 will get the ream option, that is all you have to change, _rearm_enable has to be "true" in the config of course.

Link to comment
Share on other sites

Axecop any way to blacklist certain vehicle classnames from being able to be rearmed?

Sure there is always a way :p

maybe the easiest way without changing the script is to just set a very high price for the vehicle you want to "blacklist"?

Link to comment
Share on other sites

Sure there is always a way :P

maybe the easiest way without changing the script is to just set a very high price for the vehicle you want to "blacklist"?

 

Sounds like a good idea.

 

An array of blacklisted vehicle classnames would be even better :D

Link to comment
Share on other sites

An array of blacklisted vehicle classnames would be even better :D

If you want just add something like that, it is just a few lines of code :D

 

add this to the config section:

_vehicle_blacklist = ["ArmoredSUV_PMC_DZE", ...];

change line 124 from

if (local _vehicle && _inVehicle) then {

to

if (!((typeOf _vehicle) in _vehicle_blacklist) && local _vehicle && _inVehicle) then {

that only works for exact vehicle class names, not parent classes like "Helicopter" or something, but this is the simplest solution I think. :D

Link to comment
Share on other sites

Awesome! Ty sir.

wait, sorry I think there is an logic error in the script, I didn't test it but there was a "typeof" missing, just noticed that :D

(_vehicle in _vehicle_blacklist) shoud be ((typeOf _vehicle) in _vehicle_blacklist)

to get the class of the vehicle you need to use typeOf, not the vehicle itself or the blacklist won't work, sorry again, I just wrote the code here in the forum.

Link to comment
Share on other sites

  • 2 weeks later...

Added the scripts to my Epoch server and am getting the options on scroll menu, but nothing happens, no refuel, no repair; haven't tried rearm yet.

 

Any ideas?

 

IT's OK, SORTED. Silly mistake.

 

Great script and installation guide. Axe Cop. Thanks so much for sharing it. All the very best to you.

Link to comment
Share on other sites

Is there a fix so you can rearm one seating planes and or the driver seat of some choppers? Example the F35B. Any help would be appreciated!

I think this was answered multiple time sin this thread, go some pages back or search the thread there is a solution somewhere.

 

 

Added the scripts to my Epoch server and am getting the options on scroll menu, but nothing happens, no refuel, no repair; haven't tried rearm yet.

 

Any ideas?

Check your client log file for script errors, maybe you missed to add some files I can't tell without more details.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...