Bitte schreibt mir was ihr bis morgen Mittag alles braucht als Anhänge!
Bis dahin wären Ansätze ganz hilfreich
Bitte schreibt mir was ihr bis morgen Mittag alles braucht als Anhänge!
Bis dahin wären Ansätze ganz hilfreich
zu mindestens die Logfiles wären schon mal hilfreich um zu sehen was passiert ;-). Auch wenn Du keine Fehler bisher gefunden hast schicke mal die Client und Server Logs hier rein.
Gruß,
moeck
Ich tippe das du in der Gather ein Fehler hast
Ich tippe das du in der Gather ein Fehler hast
Hier die RPT Log File:
arma3server_x64_2017-03-24_12-18-39.rpt
Das hier wäre die Config_Gather.hpp
class CfgGather {
zoneSize = 30;
class Resources {
class apple {
amount = 5;
zones[] = { "apple_1", "apple_2", "apple_3", "apple_4" };
item = "";
};
class peach {
amount = 5;
zones[] = { "peaches_1", "peaches_2", "peaches_3", "peaches_4" };
item = "";
};
class heroin_unprocessed {
amount = 3;
zones[] = { "heroin_1" };
item = "";
};
class cocaine_unprocessed {
amount = 3;
zones[] = { "cocaine_1" };
item = "";
};
class cannabis {
amount = 3;
zones[] = { "weed_1" };
item = "";
};
class sugar {
amount = 3;
zones[] = { "sugar_1" };
item = "";
};
class banana {
amount = 3;
zones[] = { "banana_1" };
item = "";
};
class wheat {
amount = 3;
zones[] = { "wheat_1" };
item = "";
};
};
/*
This block can be set using percent,if you want players to mine only one resource ,just leave it as it is.
Example:
class copper_unrefined
{
amount = 2;
zones[] = { "copper_mine" };
item = "pickaxe";
mined[] = { "copper_unrefined" };
This will make players mine only copper_unrefined
Now let's go deeper
Example 2:
class copper_unrefined
{
amount = 2;
zones[] = { "copper_mine" };
item = "pickaxe";
mined[] = { {"copper_unrefined",0,25},{"iron_unrefined",25,95},{"diamond_uncut",95,100} };
};
This will give :
25(±1)% to copper_unrefined;
70(±1)% to iron_unrefined;
5%(±1)% to diamond_uncut;
! Watch Out !
If percents are used,you MUST put more than 1 resource in the mined parameter
mined[] = { {"copper_unrefined",0,25} }; NOT OK (But the script will work)
mined[] = { {"copper_unrefined",0,45 },{"iron_unrefined",45} }; NOT OK (The script won't work )
mined[] = { {"copper_unrefined",0,45},{"copper_unrefined",80,100} }; NOT OK
mined[] = { "copper_unrefined" }; OK
mined[] = { {"copper_unrefined",0,35} , { "iron_unrefined" ,35,100 } }; OK
*/
class Minerals {
class copper_unrefined {
amount = 2;
zones[] = { "copper_mine" };
item = "pickaxe";
mined[] = {"copper_unrefined"};
};
class iron_unrefined {
amount = 2;
zones[] = { "iron_mine" };
item = "pickaxe";
mined[] = { "iron_unrefined" };
};
class salt_unrefined {
amount = 2;
zones[] = { "salt_mine" };
item = "pickaxe";
mined[] = { "salt_unrefined" };
};
class diamond_uncut {
amount = 2;
zones[] = { "diamond_mine" };
item = "pickaxe";
mined[] = { "diamond_uncut" };
};
class rock {
amount = 2;
zones[] = { "rock_quarry" };
item = "pickaxe";
mined[] = { "rock" };
};
class oil_unprocessed {
amount = 2;
zones[] = { "oil_field_1", "oil_field_2" };
item = "pickaxe";
mined[] = { "oil_unprocessed" };
};
};
};
Alles anzeigen
versuche mal das hier
class CfgGather {
class Resources {
class apple {
amount = 5;
zones[] = { "apple_1", "apple_2", "apple_3", "apple_4" };
item = "";
zoneSize = 30;
};
class peach {
amount = 5;
zones[] = { "peaches_1", "peaches_2", "peaches_3", "peaches_4" };
item = "";
zoneSize = 30;
};
class heroin_unprocessed {
amount = 3;
zones[] = { "heroin_1" };
item = "";
zoneSize = 30;
};
class cocaine_unprocessed {
amount = 3;
zones[] = { "cocaine_1" };
item = "";
zoneSize = 30;
};
class cannabis {
amount = 3;
zones[] = { "weed_1" };
item = "";
zoneSize = 30;
};
class sugar {
amount = 3;
zones[] = { "sugar_1" };
item = "";
zoneSize = 30;
};
class banana {
amount = 3;
zones[] = { "banana_1" };
item = "";
zoneSize = 30;
};
class wheat {
amount = 3;
zones[] = { "wheat_1" };
item = "";
zoneSize = 30;
};
};
/*
This block can be set using percent,if you want players to mine only one resource ,just leave it as it is.
Example:
class copper_unrefined
{
amount = 2;
zones[] = { "copper_mine" };
item = "pickaxe";
mined[] = { "copper_unrefined" };
This will make players mine only copper_unrefined
Now let's go deeper
Example 2:
class copper_unrefined
{
amount = 2;
zones[] = { "copper_mine" };
item = "pickaxe";
mined[] = { {"copper_unrefined",0,25},{"iron_unrefined",25,95},{"diamond_uncut",95,100} };
};
This will give :
25(±1)% to copper_unrefined;
70(±1)% to iron_unrefined;
5%(±1)% to diamond_uncut;
! Watch Out !
If percents are used,you MUST put more than 1 resource in the mined parameter
mined[] = { {"copper_unrefined",0,25} }; NOT OK (But the script will work)
mined[] = { {"copper_unrefined",0,45 },{"iron_unrefined",45} }; NOT OK (The script won't work )
mined[] = { {"copper_unrefined",0,45},{"copper_unrefined",80,100} }; NOT OK
mined[] = { "copper_unrefined" }; OK
mined[] = { {"copper_unrefined",0,35} , { "iron_unrefined" ,35,100 } }; OK
*/
class Minerals {
class copper_unrefined {
amount = 2;
zones[] = { "copper_mine" };
item = "pickaxe";
mined[] = {"copper_unrefined"};
};
class iron_unrefined {
amount = 2;
zones[] = { "iron_mine" };
item = "pickaxe";
mined[] = { "iron_unrefined" };
zoneSize = 30;
};
class salt_unrefined {
amount = 2;
zones[] = { "salt_mine" };
item = "pickaxe";
mined[] = { "salt_unrefined" };
zoneSize = 30;
};
class diamond_uncut {
amount = 2;
zones[] = { "diamond_mine" };
item = "pickaxe";
mined[] = { "diamond_uncut" };
zoneSize = 30;
};
class rock {
amount = 2;
zones[] = { "rock_quarry" };
item = "pickaxe";
mined[] = { "rock" };
zoneSize = 30;
};
class oil_unprocessed {
amount = 2;
zones[] = { "oil_field_1", "oil_field_2" };
item = "pickaxe";
mined[] = { "oil_unprocessed" };
zoneSize = 30;
};
};
};
Alles anzeigen
fn_gather.sqf bitte liegt im Actions Ordner
Brizi Jaeger : ich denke dass der Fehler in der Config liegt , warum sollte man an der fn_gather was ändern . Ich habe in der Config mal die Zonen in die Items gepackt und wenn ich mir die fn_gather anschaue könnte das durchaus das Problem sein.
Das is die fn_gather.sqf aus dem actions Ordner
#include "..\..\script_macros.hpp"
/*
File: fn_gather.sqf
Author: Devilfloh
Description:
Main functionality for gathering.
*/
private["_maxGather","_resource","_amount","_maxGather","_requiredItem"];
if (life_action_inUse) exitWith {};
if ((vehicle player) != player) exitWith {};
if (player getVariable "restrained") exitWith {hint localize "STR_NOTF_isrestrained";};
if (player getVariable "playerSurrender") exitWith {hint localize "STR_NOTF_surrender";};
life_action_inUse = true;
_zone = "";
_requiredItem = "";
_zoneSize = (getNumber(missionConfigFile >> "CfgGather" >> "zoneSize"));
_exit = false;
_resourceCfg = missionConfigFile >> "CfgGather" >> "Resources";
for "_i" from 0 to count(_resourceCfg)-1 do {
_curConfig = _resourceCfg select _i;
_resource = configName _curConfig;
_maxGather = getNumber(_curConfig >> "amount");
_resourceZones = getArray(_curConfig >> "zones");
_requiredItem = getText(_curConfig >> "item");
{
if ((player distance (getMarkerPos _x)) < _zoneSize) exitWith {_zone = _x;};
} forEach _resourceZones;
if (_zone != "") exitWith {};
};
if (_zone isEqualTo "") exitWith {life_action_inUse = false;};
if (_requiredItem != "") then {
_valItem = missionNamespace getVariable "life_inv_" + _requiredItem;
if (_valItem < 1) exitWith {
switch (_requiredItem) do {
//Messages here
};
life_action_inUse = false;
_exit = true;
};
};
if (_exit) exitWith {life_action_inUse = false;};
_amount = round(random(_maxGather)) + 1;
_diff = [_resource,_amount,life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff;
if (_diff isEqualTo 0) exitWith {
hint localize "STR_NOTF_InvFull";
life_action_inUse = false;
};
switch (_requiredItem) do {
case "pickaxe": {player say3D "mining";};
default {player say3D "harvest";};
};
for "_i" from 0 to 4 do {
player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";};
sleep 0.5;
};
if ([true,_resource,_diff] call life_fnc_handleInv) then {
_itemName = M_CONFIG(getText,"VirtualItems",_resource,"displayName");
titleText[format[localize "STR_NOTF_Gather_Success",(localize _itemName),_diff],"PLAIN"];
};
sleep 1;
life_action_inUse = false;
Alles anzeigen
Es funktioniert! VIELEN DANK <33
versuche mal das hier
Code Alles anzeigenclass CfgGather { class Resources { class apple { amount = 5; zones[] = { "apple_1", "apple_2", "apple_3", "apple_4" }; item = ""; zoneSize = 30; }; class peach { amount = 5; zones[] = { "peaches_1", "peaches_2", "peaches_3", "peaches_4" }; item = ""; zoneSize = 30; }; class heroin_unprocessed { amount = 3; zones[] = { "heroin_1" }; item = ""; zoneSize = 30; }; class cocaine_unprocessed { amount = 3; zones[] = { "cocaine_1" }; item = ""; zoneSize = 30; }; class cannabis { amount = 3; zones[] = { "weed_1" }; item = ""; zoneSize = 30; }; class sugar { amount = 3; zones[] = { "sugar_1" }; item = ""; zoneSize = 30; }; class banana { amount = 3; zones[] = { "banana_1" }; item = ""; zoneSize = 30; }; class wheat { amount = 3; zones[] = { "wheat_1" }; item = ""; zoneSize = 30; }; }; /* This block can be set using percent,if you want players to mine only one resource ,just leave it as it is. Example: class copper_unrefined { amount = 2; zones[] = { "copper_mine" }; item = "pickaxe"; mined[] = { "copper_unrefined" }; This will make players mine only copper_unrefined Now let's go deeper Example 2: class copper_unrefined { amount = 2; zones[] = { "copper_mine" }; item = "pickaxe"; mined[] = { {"copper_unrefined",0,25},{"iron_unrefined",25,95},{"diamond_uncut",95,100} }; }; This will give : 25(±1)% to copper_unrefined; 70(±1)% to iron_unrefined; 5%(±1)% to diamond_uncut; ! Watch Out ! If percents are used,you MUST put more than 1 resource in the mined parameter mined[] = { {"copper_unrefined",0,25} }; NOT OK (But the script will work) mined[] = { {"copper_unrefined",0,45 },{"iron_unrefined",45} }; NOT OK (The script won't work ) mined[] = { {"copper_unrefined",0,45},{"copper_unrefined",80,100} }; NOT OK mined[] = { "copper_unrefined" }; OK mined[] = { {"copper_unrefined",0,35} , { "iron_unrefined" ,35,100 } }; OK */ class Minerals { class copper_unrefined { amount = 2; zones[] = { "copper_mine" }; item = "pickaxe"; mined[] = {"copper_unrefined"}; }; class iron_unrefined { amount = 2; zones[] = { "iron_mine" }; item = "pickaxe"; mined[] = { "iron_unrefined" }; zoneSize = 30; }; class salt_unrefined { amount = 2; zones[] = { "salt_mine" }; item = "pickaxe"; mined[] = { "salt_unrefined" }; zoneSize = 30; }; class diamond_uncut { amount = 2; zones[] = { "diamond_mine" }; item = "pickaxe"; mined[] = { "diamond_uncut" }; zoneSize = 30; }; class rock { amount = 2; zones[] = { "rock_quarry" }; item = "pickaxe"; mined[] = { "rock" }; zoneSize = 30; }; class oil_unprocessed { amount = 2; zones[] = { "oil_field_1", "oil_field_2" }; item = "pickaxe"; mined[] = { "oil_unprocessed" }; zoneSize = 30; }; }; };
Freut mich
#close