You are not logged in.

  • Login
Bitte besucht unser neues Forum unter https://forum.nitrado.net | Please visit our new Forum at https://forum.nitrado.net

Dear visitor, welcome to Nitrado.net Prepaid Gameserver Community-Support - Archiv. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

1

Tuesday, June 3rd 2014, 11:41pm

ServicePoint

wie kann ich in dem script das refuel zum beispiel auf 2 gold setzen anstatt auf free ich habe die datei schon geshen weiß aber noch nicht genau wie

Cubitron

User / Kunde

Posts: 1,099

Occupation: Sales Consultant

Thanks: 11

  • Send private message

2

Tuesday, June 3rd 2014, 11:52pm

// general settings
_folder = "service_point\"; // folder where the service point scripts are saved, relative to the mission file
_servicePointClasses = ["Land_benzina_schnell"]; // service point classes (can be house, vehicle and unit classes)
_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 <------------------------------------ bin mir nicht ganz sicher evtl freimachen oder gold eintragen , prbiers aus
_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",[]]]) <-------------------------------------- hier einaml Gold eintragen
_refuel_updateInterval = 1; // update interval (in seconds)
_refuel_amount = 0.05; // amount of fuel to add with every update (in percent)


steht in der service sqf


Kein Support über PN

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

3

Wednesday, June 4th 2014, 9:04pm

kannst mir sagen wo ich genau das mit gold oder silber eintrage

Blah1302

User / Kunde

  • "Blah1302" is male

Posts: 2,674

Location: NRW

Thanks: 25

  • Send private message

4

Wednesday, June 4th 2014, 9:10pm

Naja ... wenn man 5 Zeilen drunter geht muss man doch sehen wie das geht ...

Source code

1
2
3
4
_refuel_costs = [
	["Air",["ItemGoldBar",4]], // 2 10oz Gold for helicopters and planes
	["AllVehicles",["ItemGoldBar",1]] // 1 10oz Gold for all other vehicles
];
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen.
Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

5

Thursday, June 5th 2014, 3:15pm

hier ist mein script bekomme es nicht hin

Spoiler Spoiler

// refuel settings
_refuel_enable = true; // enable or disable the refuel option
_refuel_costs = ["ItemGoldBar",4]]; // free for all vehicles (equal to [["AllVehicles",[]]])
_refuel_updateInterval = 1; // update interval (in seconds)
_refuel_amount = 0.05; // 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
];

HotBassyx

User / Kunde

Posts: 187

Thanks: 3

  • Send private message

6

Thursday, June 5th 2014, 3:18pm

// refuel settings
_refuel_enable = true; // enable or disable the refuel option
_refuel_costs = ["Air",["ItemGoldBar",4]], // 5 Gold for helicopters and planes
["AllVehicles",["ItemGoldBar",4]] // 2 Gold for all other vehicles
];

_refuel_updateInterval = 1; // update interval (in seconds)
_refuel_amount = 0.05; // 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
];

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

7

Thursday, June 5th 2014, 4:47pm

es geht einfach nicht kann ich schick dir mal meine datei
wenn ich das script normal einfüge geht es aber nur mit refuel free kannst du mir einen preis rein setzen vür ein silber nachtanken bin echt am ausrasten


kann auch was kleines spenden
Chupacabra has attached the following file:

Blah1302

User / Kunde

  • "Blah1302" is male

Posts: 2,674

Location: NRW

Thanks: 25

  • Send private message

8

Thursday, June 5th 2014, 5:17pm

Das kann doch nicht so schwer sein eine Zeile gegen nen FERTIGEN block "code" aus zu tauschen ... :rolleyes:

Spoiler Spoiler

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// 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","_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 = dayz_fuelpumparray; // service point classes (can be house, vehicle and unit classes)
_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 = [
["Air",["ItemSilverBar",3]], // 2 10oz Gold for helicopters and planes
["AllVehicles",["ItemSilverBar",1]] // 1 10oz Gold for all other vehicles
];
_refuel_updateInterval = 1; // update interval (in seconds)
_refuel_amount = 0.05; // 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 -----------------

_lastVehicle = objNull;
_lastRole = [];

SP_refuel_action = -1;
SP_repair_action = -1;
SP_rearm_actions = [];

_messageShown = false;

_fnc_removeActions = {
if (isNull _lastVehicle) exitWith {};
_lastVehicle removeAction SP_refuel_action;
SP_refuel_action = -1;
_lastVehicle removeAction SP_repair_action;
SP_repair_action = -1;
{
_lastVehicle removeAction _x;
} forEach SP_rearm_actions;
SP_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","_servicePoints","_inRange"];
_pos = getPosATL _vehicle;
_servicePoints = (nearestObjects [_pos, _servicePointClasses, _maxDistance]) - [_vehicle];
_inRange = count _servicePoints > 0;
if (_inRange) then {
private ["_servicePoint","_role","_actionCondition","_costs","_actionTitle"];
_servicePoint = _servicePoints select 0;
_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 (SP_refuel_action < 0 && _refuel_enable) then {
_costs = [_vehicle, _refuel_costs] call _fnc_getCosts;
_actionTitle = ["Refuel", _costs] call _fnc_actionTitle;
SP_refuel_action = _vehicle addAction [_actionTitle, _folder + "service_point_refuel.sqf", [_servicePoint, _costs, _refuel_updateInterval, _refuel_amount], -1, false, true, "", _actionCondition];
};
if (SP_repair_action < 0 && _repair_enable) then {
_costs = [_vehicle, _repair_costs] call _fnc_getCosts;
_actionTitle = ["Repair", _costs] call _fnc_actionTitle;
SP_repair_action = _vehicle addAction [_actionTitle, _folder + "service_point_repair.sqf", [_servicePoint, _costs, _repair_repairTime], -1, false, true, "", _actionCondition];
};
if ((_role call _fnc_isArmed) && (count SP_rearm_actions == 0) && _rearm_enable) then {
private ["_weapons"];
_costs = [_vehicle, _rearm_costs] call _fnc_getCosts;
_weapons = [_vehicle, _role] call _fnc_getWeapons;
{
private "_weaponName";
_weaponName = _x select 1;
_actionTitle = [format["Rearm %1", _weaponName], _costs] call _fnc_actionTitle;
SP_rearm_action = _vehicle addAction [_actionTitle, _folder + "service_point_rearm.sqf", [_servicePoint, _costs, _rearm_magazineCount, _x], -1, false, true, "", _actionCondition];
SP_rearm_actions set [count SP_rearm_actions, SP_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;
};

Ich hoffe das ItemSilverBar der richtige Classname ist, hab den nicht im Kopf.
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen.
Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

9

Thursday, June 5th 2014, 5:41pm

ohhh man vielen dank sorry wegen dem stress jetzt geht es :D :D :D :D :D :D :D :D habe meine nochmal angeschaut weiß aber nicht was es war kannst du vielleicht was kurzes dazu sagen

Blah1302

User / Kunde

  • "Blah1302" is male

Posts: 2,674

Location: NRW

Thanks: 25

  • Send private message

10

Thursday, June 5th 2014, 5:52pm

Was soll man denn dazu noch sagen außer megafacepalm? ^^ ... Du hättest das einfach nur 6 Zeilen weiter unten raus kopieren müssen ...

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// refuel settings
_refuel_enable = true; // enable or disable the refuel option
_refuel_costs = [
["Air",["ItemSilverBar",3]], // 2 10oz Gold for helicopters and planes
["AllVehicles",["ItemSilverBar",1]] // 1 10oz Gold for all other vehicles
];
_refuel_updateInterval = 1; // update interval (in seconds)
_refuel_amount = 0.05; // 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)

Bei dir hat am Anfang eine "[" gefehlt.
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen.
Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.

Wallnuss

User / Kunde

Posts: 746

Thanks: 2

  • Send private message

11

Thursday, June 5th 2014, 6:58pm

Hi
Sorry das ich mich hier reinhänge ich fummel da auch gerade rum habs damit gelösst das ich einen Heli mit 0 Gold refuel bekomme beim Fahrzeug steht Free
der Ordnung halber möchte ich aber auch beim Heli Free haben

["Air",["ItemGoldBar",0]], // 0 Gold for helicopters and planes
[["AllVehicles",[]]] // free for all other vehicles -------so sollte es doch aussehen ODER ?
]; // free for all vehicles (equal to [["AllVehicles",[]]])

wenn ich in der mittleren zeile die beiden neuen [] setze wie unten beschrieben geht das refuel gar nicht .....hab ich da nen Denkfehler ? wie gesagt habs mit 0 gold hinbekommen nur möchte ich das es richtig aussieht

Fehler gefunden

// refuel settings
_refuel_enable = true; // enable or disable the refuel option
_refuel_costs = [
["AllVehicles",[]] // free for all
];

bei mir tankt mann umsonnst :) :)

mfg
Nuss

This post has been edited 1 times, last edit by "Wallnuss" (Jun 5th 2014, 8:01pm)


Blah1302

User / Kunde

  • "Blah1302" is male

Posts: 2,674

Location: NRW

Thanks: 25

  • Send private message

12

Thursday, June 5th 2014, 7:12pm

versuchs mal so:

Source code

1
2
3
_refuel_costs = [
["AllVehicles",["ItemSilverBar",1]] // 1 10oz Gold for all other vehicles
];
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen.
Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

13

Thursday, June 5th 2014, 7:20pm

jetzt stehen zwar die preise dran aber es wir nicht nachgefüllt egal luft oder land lol

Blah1302

User / Kunde

  • "Blah1302" is male

Posts: 2,674

Location: NRW

Thanks: 25

  • Send private message

14

Thursday, June 5th 2014, 7:26pm

Was geht nicht mit Helis? Das muss gehen.
1. Der darf sich überhaupt nicht bewegen.
2. musst du 10m an dem Service-Point Objekt sein.
Da 10m für die meisten Helis nicht wirklich viel ist würde ich mal den Radius erhöhen:

Source code

1
_maxDistance = 25; // maximum distance from a service point for the options to be shown

Außerdem muss die Pfadangabe stimmen:

Source code

1
_folder = "service_point"; // folder where the service point scripts are saved, relative to the mission file
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen.
Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

15

Thursday, June 5th 2014, 7:53pm

ich bin mit dem heli oder auto davor geht beides nicht die anzeige kommt aber

Blah1302

User / Kunde

  • "Blah1302" is male

Posts: 2,674

Location: NRW

Thanks: 25

  • Send private message

16

Thursday, June 5th 2014, 7:58pm

Nimmt er denn Silber aus deinem Inventar? Wenn nicht könnte das daran liegen das du es "klein" bzw. passend haben musst, durch den "Währungsrechner" von Epoch. Ich habe das 1:1 auf meinem Server gehabt und das lief.
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen.
Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.

Chupacabra

User / Kunde

  • "Chupacabra" is male
  • "Chupacabra" started this thread

Posts: 248

  • Send private message

17

Friday, June 6th 2014, 2:53pm

jetzt geht es :D :D :D :D
habe den server und dieses script laufen lassen danach wieder eingebaut alles ok

This post has been edited 2 times, last edit by "Chupacabra" (Jun 6th 2014, 4:13pm)


Schneewittchen

User / Kunde

Posts: 191

  • Send private message

18

Sunday, June 29th 2014, 3:36pm

Hallo, ist das auch noch für die v1.0.5.1 aktuell ?
schaut sehr gut aus das ganze.

Wallnuss

User / Kunde

Posts: 746

Thanks: 2

  • Send private message

19

Tuesday, July 29th 2014, 3:22pm

Hi

@ Schneewittchen

http://epochmod.com/forum/index.php?/top…r-rearm-script/

klar funktioniert es ist das neuste update

mfg nuss

Bitte besucht unser neues Forum unter https://forum.nitrado.net| Please visit our new Forum at https://forum.nitrado.net