Beiträge von Harti2000
-
-
-
Fehler gefunden wurde gefixt
und fehler in Vehicelconfig
server geht wieder -
Frage Weißt du wie iche s Komplett Enferne?
Warning Message: File mpmissions\Native_Network.Altis\description.ext, line 325: /CarShops/: Missing '}'
Geh in mpmissions\Native_Network.Altis\description.ext
suche nach der Line 325 / Car Shops
und dort fehlt eine '}' , da hast du den ersten fehler wegWarning Message: File mpmissions\Native_Network.Altis\Config_Vehicles.hpp, line 191: /CarShops/CfgVehicles.I_Truck_02_medical_F: Member already defined.
geh zu mpmissions\Native_Network.Altis\Config_Vehicles.hpp
such die line 191
suchst dort CarShops/CfgVehicles.I_Truck_02_medical_F
den löscht du dann, da dieser 2 mal oder öfters von dir eingetragen wurde, [wichtig, wenn du diesen Truck_02_medical_F haben möchtes, dann lass ihn 1 mal in der CfgVehicles stehen]Fehler 2 Wurde somit behoben
Code: \life_server\Functions\DynMarket\fn_sleeper.sqf Ersetzten
Alles anzeigen/* ##################### DYNAMIC MARKET SCRIPT ##################### ### AUTHOR: RYAN TT. ### ### STEAM: www.steamcommunity.com/id/ryanthett ### ### ### ### DISCLAIMER: THIS SCRIPT CAN BE USED ON EVERY SERVER ONLY ### ### WITH THIS HEADER / NOTIFICATION ### ################################################################# */ while {true} do { sleep (DYNMARKET_PriceUpdateInterval*60); [0] remoteExecCall ["life_fnc_update",0]; sleep 5; [] spawn TON_fnc_calculatePrices; DYNMARKET_UpdateCount = DYNMARKET_UpdateCount + 1; if ((DYNMARKET_UpdateCount==DYNMARKET_CreateBackupInterval)&&DYNMARKET_CreateBackups) then { [] spawn { DYNMARKET_UpdateCount = 0; [0] call TON_fnc_HandleDB; // Call the Database and update the prices in the DB }; }; };
Code: \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 127 ersetzten
Alles anzeigen/* ##################### DYNAMIC MARKET SCRIPT ##################### ### AUTHOR: RYAN TT. ### ### STEAM: www.steamcommunity.com/id/ryanthett ### ### ### ### DISCLAIMER: THIS SCRIPT CAN BE USED ON EVERY SERVER ONLY ### ### WITH THIS HEADER / NOTIFICATION ### ################################################################# */ _tempArrayHolder = DYNMARKET_Items_CurrentPriceArr; { _itemName = _x select 0; _itemLastPrice = _x select 1; _itemAmountSold = _x select 2; _itemPricePerUnit = 0; _itemPriceMin = 0; _itemPriceMax = 0; _itemGroupName = ""; _itemFactorOfGroup = 0; _exit = false; if (_itemAmountSold>0) then { { if (!_exit) then { _GROUParray = _x; _itemGroupName = _GROUParray select 0; _GROUPITEMSarray = _GROUParray select 1; _itemFactorOfGroup = _GROUParray select 2; { _ITEMSarray = _x; _curITEMname = _ITEMSarray select 0; _curITEMpriceperunit = _ITEMSarray select 1; _curITEMmin = _ITEMSarray select 2; _curITEMmax = _ITEMSarray select 3; if (_curITEMname==_itemName) then { _exit = true; _itemPricePerUnit = _curITEMpriceperunit; _itemPriceMin = _curITEMmin; _itemPriceMax = _curITEMmax; }; } forEach _GROUPITEMSarray; }; } forEach DYNMARKET_Items_Groups; //ADJUST THE PRICES { _GROUParray = _x; _GROUPNAME = _GROUParray select 0; _GROUPITEMSarray = _GROUParray select 1; if (_itemGroupName==_GROUPNAME) then { { _ITEMSarray = _x; _curITEMname = _ITEMSarray select 0; _curITEMpriceperunit = _ITEMSarray select 1; _curITEMmin = _ITEMSarray select 2; _curITEMmax = _ITEMSarray select 3; if (_curITEMname==_itemName) then { // Find old price _curItemOldPrice = 0; { _curItemName2 = _x select 0; _curItemPrice2 = _x select 1; _curItemAmountSold2 = _x select 2; if (_curItemName2==_curITEMname) then { _curItemOldPrice = _curItemPrice2; }; } forEach DYNMARKET_Items_CurrentPriceArr; // Calculate new own price _NEWPRICE = _curItemOldPrice-(_itemAmountSold*(_curItemOldPrice/200)*_itemFactorOfGroup); if (_NEWPRICE<_curITEMmin) then {_NEWPRICE=_curITEMmin}; if (_NEWPRICE>_curITEMmax) then {_NEWPRICE=_curITEMmax}; _index = -1; { _index = _index + 1; _curItemName3 = _x select 0; _curItemPrice3 = _x select 1; _curItemAmountSold3 = _x select 2; if (_curItemName3==_curITEMname) then { DYNMARKET_Items_CurrentPriceArr set [_index,[_curITEMname,_NEWPRICE,0]]; }; } forEach DYNMARKET_Items_CurrentPriceArr; } else { // Calculate new price _index = -1; { _index = _index + 1; _curItemName3 = _x select 0; _curItemPrice3 = _x select 1; _curItemAmountSold3 = _x select 2; if (_curItemName3==_curITEMname) then { _NEWPRICE = _curItemPrice3+(_itemAmountSold*(_curItemPrice3/100)*_itemFactorOfGroup); if (_NEWPRICE<_curITEMmin) then {_NEWPRICE=_curITEMmin}; if (_NEWPRICE>_curITEMmax) then {_NEWPRICE=_curITEMmax}; DYNMARKET_Items_CurrentPriceArr set [_index,[_curITEMname,_NEWPRICE,_curItemAmountSold3]]; }; } forEach DYNMARKET_Items_CurrentPriceArr; }; } forEach _GROUPITEMSarray; }; } forEach DYNMARKET_Items_Groups; }; } forEach DYNMARKET_Items_CurrentPriceArr; DYNMARKET_Items_CurrentPriceArr = _tempArrayHolder; //[1,DYNMARKET_Items_CurrentPriceArr] remoteExecCall ["life_fnc_update",2]; // Translate to sell_array { _itemName = _x select 0; _itemNewPrice = _x select 1; _index = -1; { _index = _index + 1; _curItemName = _x select 0; if (_curItemName==_itemName) then { DYNMARKET_sellarraycopy set [_index,[_itemName,_itemNewPrice]]; }; } forEach DYNMARKET_sellarraycopy; } forEach DYNMARKET_Items_CurrentPriceArr; [1,DYNMARKET_sellarraycopy] remoteExecCall ["life_fnc_update",2];
dann müsstest du alles wieder zum Laufen bekommen
Mit freundlichen grüßen 22.Infanterie Regiment
Bei Weiteren Fragen einfach PN an mich, dann versuchen wir es zusammen zu lösen und Posten am ende die Lösung hier, damit andere die das Problem auch haben, Ihren fehler schnell fixen können -
Zeilord
Thx für deine Antwort,
Aber ich hab es selber hin bekommen, leider weis ich gar nicht mehr was der fehler war -
hay, habe den fehler gefunden , nun geht alles
es war nur ein kleiner fehler in der Life_server datai -
okay, ich versuch da mal das Zeug raus zu hollen, damit ich nicht neu anfangen muss danke
-
hab es gerade aus Probiert , leider wird beim verkauf angezeigt wie viel ich selbst verkauft habe, aber der Preis updatet sich nicht
und wenn die nachricht kommt Marktpreise werden ermittelt ,
steht der gleiche Preis da aber die verkaufte menge ist wieder weg .
Was muss ich noch tun damit alles funktioniert -
okay, werd ich mal testen
gebe dann bescheid -
so nun habe ich es mal angepasst
nun wir im Marktsystem angezeigt wie viel ich verkauft habe
Trotzdem bleibt der Preis gleich , auch nach längerem warten, passiert nichts -
kannst du mir dabei Helfen Snakeshit
-
Logs sind im Anhang
-
Spoiler anzeigen
12:02:22 File life_server\Functions\DynMarket\fn_config.sqf, line 75
12:02:22 "extDB3: Protocol Error: [0,""Error MariaDBQueryException Exception""]"
12:02:22 Error in expression <rray = _queryResult select 0;
if (count _pricearray < 1) then {
diag_log "######>
12:02:22 Error position: <_pricearray < 1) then {
diag_log "######>
12:02:22 Error Undefined variable in expression: _pricearray
12:02:22 File \life_server\Functions\DynMarket\fn_HandleDB.sqf [TON_fnc_HandleDB], line 33
12:03:32 Error in expression <ET_Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select >
12:03:32 Error position: <_x select 0;
_itemLastPrice = _x select >
12:03:32 Error Undefined variable in expression: _x
12:03:32 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:03:32 Error in expression <ET_Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select >
12:03:32 Error position: <_x select 0;
_itemLastPrice = _x select >
12:03:32 Error Undefined variable in expression: _x
12:03:32 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:03:32 Error in expression <Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select 1;
>
12:03:32 Error position: <select 0;
_itemLastPrice = _x select 1;
>
12:03:32 Error select: Type Number, expected Array,String,Config entry
12:03:32 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:04:16 Unaccessible
12:04:20 Setting invalid pitch -249519503803371070000000000000000.0000 for L Bravo 3-5:1 REMOTE
12:04:20 Setting invalid pitch -249519503803371070000000000000000.0000 for L Bravo 3-6:1 REMOTE
12:04:21 Scripting function 'cat_locker_fnc_fetchlockertrun...' is not allowed to be remotely executed
12:04:21 Scripting function 'cat_alarm_fnc_loadsecurity' is not allowed to be remotely executed
12:04:37 Error in expression <ET_Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select >
12:04:37 Error position: <_x select 0;
_itemLastPrice = _x select >
12:04:37 Error Undefined variable in expression: _x
12:04:37 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:04:37 Error in expression <ET_Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select >
12:04:37 Error position: <_x select 0;
_itemLastPrice = _x select >
12:04:37 Error Undefined variable in expression: _x
12:04:37 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:04:37 Error in expression <Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select 1;
>
12:04:37 Error position: <select 0;
_itemLastPrice = _x select 1;
>
12:04:37 Error select: Type Number, expected Array,String,Config entry
12:04:37 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:04:38 "### DYNMARKET >> SUCCESSFULLY BACKUP'D CURRENT PRICES TO DATABASE! ###"
12:05:42 Error in expression <ET_Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select >
12:05:42 Error position: <_x select 0;
_itemLastPrice = _x select >
12:05:42 Error Undefined variable in expression: _x
12:05:42 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:05:42 Error in expression <ET_Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select >
12:05:42 Error position: <_x select 0;
_itemLastPrice = _x select >
12:05:42 Error Undefined variable in expression: _x
12:05:42 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
12:05:42 Error in expression <Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select 1;
>
12:05:42 Error position: <select 0;
_itemLastPrice = _x select 1;
>
12:05:42 Error select: Type Number, expected Array,String,Config entry
12:05:42 File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 13
fn_calculatePrices
/*
##################### DYNAMIC MARKET SCRIPT #####################
### AUTHOR: RYAN TT. ###
### STEAM: http://www.steamcommunity.com/id/ryanthett ###
### ###
### DISCLAIMER: THIS SCRIPT CAN BE USED ON EVERY SERVER ONLY ###
### WITH THIS HEADER / NOTIFICATION ###
#################################################################
*/
_tempArrayHolder = DYNMARKET_Items_CurrentPriceArr;
{
_itemName = _x select 0;
_itemLastPrice = _x select 1;
_itemAmountSold = _x select 2;
_itemPricePerUnit = 0;
_itemPriceMin = 0;
_itemPriceMax = 0;
_itemGroupName = "";
_itemFactorOfGroup = 0;
_exit = false;
if (_itemAmountSold>0) then
{
{
if (!_exit) then {
_GROUParray = _x;
_itemGroupName = _GROUParray select 0;
_GROUPITEMSarray = _GROUParray select 1;
_itemFactorOfGroup = _GROUParray select 2;
{
_ITEMSarray = _x;
_curITEMname = _ITEMSarray select 0;
_curITEMpriceperunit = _ITEMSarray select 1;
_curITEMmin = _ITEMSarray select 2;
_curITEMmax = _ITEMSarray select 3;
if (_curITEMname==_itemName) then {
_exit = true;
_itemPricePerUnit = _curITEMpriceperunit;
_itemPriceMin = _curITEMmin;
_itemPriceMax = _curITEMmax;
};
} forEach _GROUPITEMSarray;
};
} forEach DYNMARKET_Items_Groups;
//ADJUST THE PRICES
{
_GROUParray = _x;
_GROUPNAME = _GROUParray select 0;
_GROUPITEMSarray = _GROUParray select 1;
if (_itemGroupName==_GROUPNAME) then
{
{
_ITEMSarray = _x;
_curITEMname = _ITEMSarray select 0;
_curITEMpriceperunit = _ITEMSarray select 1;
_curITEMmin = _ITEMSarray select 2;
_curITEMmax = _ITEMSarray select 3;
if (_curITEMname==_itemName) then
{
// Find old price
_curItemOldPrice = 0;
{
_curItemName2 = _x select 0;
_curItemPrice2 = _x select 1;
_curItemAmountSold2 = _x select 2;
if (_curItemName2==_curITEMname) then {
_curItemOldPrice = _curItemPrice2;
};
} forEach DYNMARKET_Items_CurrentPriceArr;
// Calculate new own price
_NEWPRICE = _curItemOldPrice-(_itemAmountSold*(_curItemOldPrice/200)*_itemFactorOfGroup);
if (_NEWPRICE<_curITEMmin) then {_NEWPRICE=_curITEMmin};
if (_NEWPRICE>_curITEMmax) then {_NEWPRICE=_curITEMmax};
_index = -1;
{
_index = _index + 1;
_curItemName3 = _x select 0;
_curItemPrice3 = _x select 1;
_curItemAmountSold3 = _x select 2;
if (_curItemName3==_curITEMname) then {
DYNMARKET_Items_CurrentPriceArr set [_index,[_curITEMname,_NEWPRICE,0]];
};
} forEach DYNMARKET_Items_CurrentPriceArr;
} else {
// Calculate new price
_index = -1;
{
_index = _index + 1;
_curItemName3 = _x select 0;
_curItemPrice3 = _x select 1;
_curItemAmountSold3 = _x select 2;
if (_curItemName3==_curITEMname) then {
_NEWPRICE = _curItemPrice3+(_itemAmountSold*(_curItemPrice3/100)*_itemFactorOfGroup);
if (_NEWPRICE<_curITEMmin) then {_NEWPRICE=_curITEMmin};
if (_NEWPRICE>_curITEMmax) then {_NEWPRICE=_curITEMmax};
DYNMARKET_Items_CurrentPriceArr set [_index,[_curITEMname,_NEWPRICE,_curItemAmountSold3]];
};
} forEach DYNMARKET_Items_CurrentPriceArr;
};
} forEach _GROUPITEMSarray;
};
} forEach DYNMARKET_Items_Groups;
};
} forEach DYNMARKET_Items_CurrentPriceArr;
DYNMARKET_Items_CurrentPriceArr = _tempArrayHolder;
//[1,DYNMARKET_Items_CurrentPriceArr] remoteExecCall ["life_fnc_update",2];
// Translate to sell_array
{
_itemName = _x select 0;
_itemNewPrice = _x select 1;
_index = -1;
{
_index = _index + 1;
_curItemName = _x select 0;
if (_curItemName==_itemName) then {
DYNMARKET_sellarraycopy set [_index,[_itemName,_itemNewPrice]];
};
} forEach DYNMARKET_sellarraycopy;
} forEach DYNMARKET_Items_CurrentPriceArr;
[1,DYNMARKET_sellarraycopy] remoteExecCall ["life_fnc_update",2];
fn_HandleDB
/*
##################### DYNAMIC MARKET SCRIPT #####################
### AUTHOR: RYAN TT. ###
### STEAM: http://www.steamcommunity.com/id/ryanthett ###
### ###
### DISCLAIMER: THIS SCRIPT CAN BE USED ON EVERY SERVER ONLY ###
### WITH THIS HEADER / NOTIFICATION ###
#################################################################
*/
_switch = _this select 0;
_whatanumber = 1;
switch (_switch) do
{
case 0:
{
_query = format["DYNMARKET_Price_Set:%1",DYNMARKET_Items_CurrentPriceArr];
waitUntil {sleep (random 0.3); !DB_Async_Active};
_queryResult = [_query,1] call DB_fnc_asyncCall;
diag_log "### DYNMARKET >> SUCCESSFULLY BACKUP'D CURRENT PRICES TO DATABASE! ###";
};
case 1:
{
_query = format["DYNMARKET_Price_Get"];
waitUntil{sleep (random 0.3); !DB_Async_Active};
_tickTime = diag_tickTime;
_queryResult = [_query,2] call DB_fnc_asyncCall;
//DYNMARKET_Items_CurrentPriceArr = _queryResult select 0;
_pricearray = _queryResult select 0;
if (count _pricearray < 1) then {
diag_log "########################## DYNAMIC MARKET ##########################";
diag_log "### >> CAN'T LOAD PRICES FROM DATABASE: ERROR 01x ###";
diag_log "### THE REQUESTED PRICEARRAY WAS UNEXPECTEDLY EMPTY! ###";
diag_log "### IF YOU ARE RUNNING DYNMARKET FOR THE FIRST TIME, ###";
diag_log "### PLEASE IGNORE THIS ERROR! ###";
diag_log "####################################################################";
} else {
DYNMARKET_Items_CurrentPriceArr = _pricearray;
{
_itemName = _x select 0;
_itemNewPrice = _x select 1;
_index = -1;
{
_index = _index + 1;
_curItemName = _x select 0;
if (_curItemName==_itemName) then {
DYNMARKET_sellarraycopy set [_index,[_itemName,_itemNewPrice]];
};
} forEach DYNMARKET_sellarraycopy;
} forEach DYNMARKET_Items_CurrentPriceArr;
diag_log "########################## DYNAMIC MARKET ##########################";
diag_log "### >> SUCCESSFULLY LOADED PRICES FROM DATABASE! ###";
diag_log "####################################################################";
};
};
};
-
habe es gerade noch mal getestet , nun kommt dieser Fehler
logs
extDB3: Protocol Error: [0,""Error MariaDBQueryException Exception""]"
11:35:32 Error in expression <rray = _queryResult select 0;
if (count _pricearray < 1) then {
diag_log "######>
11:35:32 Error position: <_pricearray < 1) then {
diag_log "######>
11:35:32 Error Undefined variable in expression: _pricearray
11:35:32 File \life_server\Functions\DynMarket\fn_HandleDB.sqf [TON_fnc_HandleDB], line 33
11:38:33 Unaccessible
-
okay , aber an was liegt es dann , hab ja wie geshen den faktio geändert
aber verstehe nicht warum es nicht klappt -
hay, aheb das Dynmarkt system drauf aber die Prewise updaiten sich nicht
config
/*
##################### DYNAMIC MARKET SCRIPT #####################
### AUTHOR: RYAN TT. ###
### STEAM: http://www.steamcommunity.com/id/ryanthett ###
### ###
### DISCLAIMER: THIS SCRIPT CAN BE USED ON EVERY SERVER ONLY ###
### WITH THIS HEADER / NOTIFICATION ###
#################################################################
*/
// ███████████████████████████████████████████████████████████████████████
// █████████████████ DYNAMIC MARKET BASIC CONFIGURATION ██████████████████
// ███████████████████████████████████████████████████████████████████████
DYNMARKET_Serveruptime = 08; // Serveruptime after restart in hours
DYNMARKET_UseExternalDatabase = true; // Should the script use the External Database?
DYNMARKET_PriceUpdateInterval = 01; // After how many minutes should the price be updated?
DYNMARKET_CreateBackups = true; // Should the server save write the prices regulary into the Database? If false, it will save the prices before Server-restart?
DYNMARKET_CreateBackupInterval = 01; // After how many updates (PriceUpdateIntervals) should the prices be saved into the Database?
DYNMARKET_UserNotification = true; // Should the user be informed with a hint whenever the prices got updated?
// █████████████████ USER NOTIFICATION TEXTS █████████████████
DYNMARKET_UserNotification_Text =
[
"Die Preise wurden akutalisiert",
"Die Marktpreise werden ermittelt"
];
// █████████████████ ITEM GROUP CONFIGURATION █████████████████
DYNMARKET_Items_Groups =
[
["Legal",
[
["apple",-1,40,120],
["peach",-1,40,120],
["oil_processed",-1,3000,5500],
["copper_refined",-1,1200,2800],
["iron_refined",-1,1400,3100],
["salt_refined",-1,2000,3800],
["glass",-1,2200,3300],
["diamond_cut",-1,4000,5800],
["cement",-1,2800,3600]
],
3.5
],
["Illegal",
[
["heroin_processed",-1,40,120],
["marijuana",-1,4500,6700],
["cocaine_processed",-1,5500,8100],
["ectasy_processed",-1,5900,9200]
],
4.5
]
];
// █████████████████ ALL SELLABLE ITEMS █████████████████
DYNMARKET_Items_ToTrack =
[
["apple",80],
["peach",80],
["oil_processed",4900],
["copper_refined",1999],
["iron_refined",2200],
["salt_refined",2800],
["glass",3000],
["diamond_cut",5100],
["cement",3500],
["heroin_processed",7499],
["marijuana",6000],
["cocaine_processed",7000],
["ectasy_processed",8100],
["tabac_processed",2000],
["bier_processed",1900],
["holz_processed",3000],
["uran_processed",6700]
];
//███████████████████████████████████████████████████████████████████████
//██████████████████ DO NOT MODIFY THE FOLLOWING CODE! ██████████████████
//███████████████████████████████████████████████████████████████████████
DYNMARKET_Items_CurrentPriceArr = [];
DYNMARKET_sellarraycopy = DYNMARKET_Items_ToTrack;
DYNMARKET_Serveruptime = (DYNMARKET_Serveruptime * 3600) - 300;
{
_currentArray = _x;
DYNMARKET_Items_CurrentPriceArr pushBack [_currentArray select 0,_currentArray select 1,1];
} forEach DYNMARKET_Items_ToTrack;
publicVariable "DYNMARKET_UserNotification";
publicVariable "DYNMARKET_UserNotification_Text";
if (DYNMARKET_UseExternalDatabase) then {[1] call TON_fnc_HandleDB;};
DYNMARKET_UpdateCount = 0;
if (DYNMARKET_UseExternalDatabase) then {
[] spawn {
sleep DYNMARKET_Serveruptime;
diag_log "### DYNMARKET >> CURRENT PRICES ARE BEING WRITTEN TO THE DATABASE ###";
diag_log "### DYNMARKET >> AS PLANNED, AWAITING RESULT... ###";
[0] call TON_fnc_HandleDB;
};
};
sleep 5;
[] call TON_fnc_sleeper;
könnte es villt auch ddaran liegen, weil man bei mir auch alle sachen auf einmal verkaufen kann?
wenn ja, wie stell ich das ein, das es trotzdem Funktioniert -
Hay,
ich wollte mal Fragen ob mir jemadn Helfen kann,
ich würde gern an unserer THS Zentrale 2 Lautsprecher Plazieren,
wo der Chef am Laptop dann eine Sirene starten lassen kann, damit die Mitarbeiter wissen, wann ein Einsatz ist,
z.b zu einem Event das man da die Sirene vom THS starten kann, über die Lautsprecher -
Hay, ich habe jetzt nach ca 1 H endlich ace zum Laufen bekommen,
wer es immer noch nicht hin bekommen hat,
der kann dies alles übernehmen.fn_handleItem.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_handleItem.sqf
Author: Bryan "Tonic" Boardwine
Description
Main gear handling functionality.
*/
private ["_item","_details","_bool","_ispack","_items","_isgun","_ongun","_override","_toUniform","_toVest","_preview","_acecheck"];
_item = [_this,0,"",[""]] call BIS_fnc_param;
_bool = [_this,1,false,[false]] call BIS_fnc_param;
_ispack = [_this,2,false,[false]] call BIS_fnc_param;
_ongun = [_this,3,false,[false]] call BIS_fnc_param;
_override = [_this,4,false,[false]] call BIS_fnc_param;
_toUniform = [_this,5,false,[false]] call BIS_fnc_param; //Manual override to send items specifically to a uniform.
_toVest = [_this,6,false,[false]] call BIS_fnc_param; //Manual override to send items specifically to a vest
_preview = [_this,7,false,[false]] call BIS_fnc_param;
_acecheck = ["ACE_atropine","ACE_morphine","ACE_epinephrine","ACE_EarPlugs","ACE_fieldDressing","ACE_elasticBandage","ACE_quikclot","ACE_packingBandage","ACE_salineIV_250","ACE_salineIV_500","ACE_tourniquet","ACE_personalAidKit","ACE_bloodIV_250","ACE_bloodIV_500","ACE_plasmaIV_250","ACE_plasmaIV_500","ACE_surgicalKit"];
//Some checks
if (_item isEqualTo "") exitWith {};
_isgun = false;
_details = [_item] call life_fnc_fetchCfgDetails;
if (count _details isEqualTo 0) exitWith {};
if (_bool) then {
switch (_details select 6) do {
case "CfgGlasses": {
if (_toUniform) exitWith {player addItemToUniform _item;};
if (_toVest) exitWith {player addItemToVest _item;};
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (!(goggles player isEqualTo "")) then {
removeGoggles player;
};
player addGoggles _item;
};
};
};
case "CfgVehicles": {
if (!(backpack player isEqualTo "")) then {
_items = (backpackItems player);
removeBackpack player;
};
player addBackpack _item;
clearAllItemsFromBackpack player;
if (!isNil "_items") then {
{[_x,true,true,false,true] call life_fnc_handleItem; } forEach _items;
};
};
case "CfgMagazines": {
if (_toUniform) exitWith {player addItemToUniform _item;};
if (_toVest) exitWith {player addItemToVest _item;};
if (_ispack) exitWith {player addItemToBackpack _item;};
if(_item in _acecheck) then{player addItem _item;};
player addMagazine _item;
};
case "CfgWeapons": {
//New addition
if (_toUniform) exitWith {player addItemToUniform _item;};
if (_toVest) exitWith {player addItemToVest _item;};
if (_ispack) exitWith {player addItemToBackpack _item;};
if(_item in _acecheck) then {player addItem _item;};
if ((_details select 4) in [1,2,4,5,4096]) then {
if ((_details select 4) isEqualTo 4096) then {
if ((_details select 5) isEqualTo -1) then {
_isgun = true;
};
} else {
_isgun = true;
};
};
if (_isgun) then {
if (!_ispack && _override) exitWith {}; //It was in the vest/uniform, try to close to prevent it overriding stuff... (Actual weapon and not an item)
if (_item isEqualTo "MineDetector") then {
player addItem _item;
} else {
player addWeapon _item;
};
} else {
switch (_details select 5) do {
case 0: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (_item in (assignedItems player)) then {
player addItem _item;
} else {
player linkItem _item;
};
};
};
};
case 605: {
if (_ispack) then{
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (headgear player isEqualTo _item && {!_preview}) then {
player addItem _item;
} else {
if (!(headgear player isEqualTo "")) then {removeHeadGear player;};
player addHeadGear _item;
};
};
};
};
case 801: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (player isKindOf "Civilian") then {
if (uniform player isEqualTo _item && {!_preview}) then {
player addItem _item;
} else {
if (!(uniform player isEqualTo "")) then {
_items = uniformItems player;
removeUniform player;
};
player addUniform _item;
if (!isNil "_items") then {
{player addItemToUniform _x} forEach _items;
};
};
} else {
if (!(uniform player isEqualTo "")) then {
_items = uniformItems player;
removeUniform player;
};
if (!(player isUniformAllowed _item)) then {
player forceAddUniform _item;
} else {
player addUniform _item;
};
if (!isNil "_items") then {
{player addItemToUniform _x} forEach _items;
};
};
};
};
};
case 701: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then{
player addItem _item;
} else {
if (vest player isEqualTo _item && {!_preview}) then {
player addItem _item;
} else {
if (!(vest player isEqualTo "")) then {
_items = vestItems player;
removeVest player;
};
player addVest _item;
if (!isNil "_items") then {
{[_x,true,false,false,true] spawn life_fnc_handleItem;} forEach _items;
};
};
};
};
};
case 201: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
private "_type";
_type = [_item,201] call life_fnc_accType;
if (_ongun) then {
switch (_type) do {
case 1: { player addPrimaryWeaponItem _item; };
case 2: { player addSecondaryWeaponItem _item; };
case 3: { player addHandgunItem _item; };
};
} else {
if (_override) then {
player addItem _item;
} else {
private ["_wepItems","_action","_slotTaken"];
_wepItems = switch (_type) do {case 1:{primaryWeaponItems player}; case 2:{secondaryWeaponItems player}; case 3:{handgunItems player}; default {["","",""]};};
_slotTaken = false;
if (!((_wepItems select 2) isEqualTo "")) then {_slotTaken = true;};
if (_slotTaken) then {
_action = [localize "STR_MISC_AttachmentMSG",localize "STR_MISC_Attachment",localize "STR_MISC_Weapon",localize "STR_MISC_Inventory"] call BIS_fnc_guiMessage;
if (_action) then {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
} else {
player addItem _item; //Add it to any available container
};
} else {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
};
};
};
};
};
case 301: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
private "_type";
_type = [_item,301] call life_fnc_accType;
if (_ongun) then {
switch (_type) do {
case 1: { player addPrimaryWeaponItem _item; };
case 2: { player addSecondaryWeaponItem _item; };
case 3: { player addHandgunItem _item; };
};
} else {
if (_override) then {
player addItem _item;
} else {
private ["_wepItems","_action","_slotTaken"];
_wepItems = switch (_type) do {case 1:{primaryWeaponItems player}; case 2:{secondaryWeaponItems player}; case 3:{handgunItems player}; default {["","",""]};};
_slotTaken = false;
if (!((_wepItems select 1) isEqualTo "")) then {_slotTaken = true;};
if (_slotTaken) then {
_action = [localize "STR_MISC_AttachmentMSG",localize "STR_MISC_Attachment",localize "STR_MISC_Weapon",localize "STR_MISC_Inventory"] call BIS_fnc_guiMessage;
if (_action) then {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
} else {
player addItem _item; //Add it to any available container
};
} else {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
};
};
};
};
};
case 101:{
if (_ispack) then {
player addItemToBackpack _item;
} else {
private "_type";
_type = [_item,101] call life_fnc_accType;
if (_ongun) then {
switch (_type) do {
case 1: { player addPrimaryWeaponItem _item; };
case 2: { player addSecondaryWeaponItem _item; };
case 3: { player addHandgunItem _item; };
};
} else {
if (_override) then {
player addItem _item;
} else {
private ["_wepItems","_action","_slotTaken"];
_wepItems = switch (_type) do {case 1:{primaryWeaponItems player}; case 2:{secondaryWeaponItems player}; case 3:{handgunItems player}; default {["","",""]};};
_slotTaken = false;
if (!((_wepItems select 0) isEqualTo "")) then {_slotTaken = true;};
if (_slotTaken) then {
_action = [localize "STR_MISC_AttachmentMSG",localize "STR_MISC_Attachment",localize "STR_MISC_Weapon",localize "STR_MISC_Inventory"] call BIS_fnc_guiMessage;
if (_action) then {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
} else {
player addItem _item; //Add it to any available container
};
} else {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
};
};
};
};
};
case 621: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
player linkItem _item;
};
};
};
case 616: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
player linkItem _item;
};
};
};
default {
if (_ispack) then {
player addItemToBackpack _item;
} else {
player addItem _item;
};
};
};
};
};
};
} else {
switch (_details select 6) do {
case "CfgVehicles": {
removeBackpack player;
};
case "CfgMagazines": {
player removeMagazine _item;
};
case "CfgGlasses": {
if (_item isEqualTo goggles player) then {
removeGoggles player;
} else {
player removeItem _item;
};
};
case "CfgWeapons": {
if ((_details select 4) in [1,2,4,5,4096]) then {
if ((_details select 4) isEqualTo 4096) then {
if ((_details select 5) isEqualTo 1) then {
_isgun = true;
};
} else {
_isgun = true;
};
};
if (_isgun) then {
switch (true) do {
case (primaryWeapon player isEqualTo _item) : {_ispack = false;};
case (secondaryWeapon player isEqualTo _item) : {_ispack = false;};
case (handgunWeapon player isEqualTo _item) : {_ispack = false;};
case (_item in assignedItems player) : {_ispack = false;};
default {_ispack = true;};
};
if (_item isEqualTo "MineDetector") then {
player removeItem _item;
} else {
//Lovely code provided by [OCB]Dash
private "_tmpfunction";
_tmpfunction = {
private ["_tWeapons","_tWeaponCount"];
switch (true) do {
case (_this in (uniformItems player)): {
_tWeapons = (getWeaponCargo (uniformContainer player)) select 0;
_tWeaponCount = (getWeaponCargo (uniformContainer player)) select 1;
clearWeaponCargo (uniformContainer player);
{
_numVestWeps = _tWeaponCount select _forEachIndex;
if (_x == _this) then
{
_numVestWeps = _numVestWeps - 1;
};
(uniformContainer player) addWeaponCargo [ _x,_numVestWeps];
}forEach _tWeapons;
};
case (_this in (vestItems player)): {
_tWeapons = (getWeaponCargo (vestContainer player)) select 0;
_tWeaponCount = (getWeaponCargo (vestContainer player)) select 1;
clearWeaponCargo (vestContainer player);
{
_numVestWeps = _tWeaponCount select _forEachIndex;
if (_x == _this) then
{
_numVestWeps = _numVestWeps - 1;
};
(vestContainer player) addWeaponCargo [ _x,_numVestWeps];
}forEach _tWeapons;
};
case (_this in (backpackItems player)): {
_tWeapons = (getWeaponCargo (backpackContainer player)) select 0;
_tWeaponCount = (getWeaponCargo (backpackContainer player)) select 1;
clearWeaponCargo (backpackContainer player);
{
_numVestWeps = _tWeaponCount select _forEachIndex;
if (_x == _this) then
{
_numVestWeps = _numVestWeps - 1;
};
(backpackContainer player) addWeaponCargo [ _x,_numVestWeps];
}forEach _tWeapons;
};
};
};
if (_ispack) then {
_item call _tmpfunction;
} else {
switch (true) do {
case (_item in (uniformItems player)): {_item call _tmpfunction;};
case (_item in (vestItems player)) : {_item call _tmpfunction;};
case (_item in (backpackItems player)) : {_item call _tmpfunction;};
default {player removeWeapon _item;};
};
};
};
} else {
switch (_details select 5) do {
case 0: {player unassignItem _item; player removeItem _item;};
case 605: {if (headgear player isEqualTo _item) then {removeHeadgear player} else {player removeItem _item};};
case 801: {if (uniform player isEqualTo _item) then {removeUniform player} else {player removeItem _item};};
case 701: {if (vest player isEqualTo _item) then {removeVest player} else {player removeItem _item};};
case 621: {player unassignItem _item; player removeItem _item;};
case 616: {player unassignItem _item; player removeItem _item;};
default {
switch (true) do {
case (_item in primaryWeaponItems player) : {player removePrimaryWeaponItem _item;};
case (_item in handgunItems player) : {player removeHandgunItem _item;};
default {player removeItem _item;};
};
};
};
};
};
};
};
fn_weaponShopBuySell.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_weaponShopBuySell.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master handling of the weapon shop for buying / selling an item.
*/
disableSerialization;
private ["_price","_item","_itemInfo","_bad"];
if ((lbCurSel 38403) isEqualTo -1) exitWith {hint localize "STR_Shop_Weapon_NoSelect"};
_price = lbValue[38403,(lbCurSel 38403)]; if (isNil "_price") then {_price = 0;};
_item = lbData[38403,(lbCurSel 38403)];
_itemInfo = [_item] call life_fnc_fetchCfgDetails;
_bad = "";
if ((_itemInfo select 6) != "CfgVehicles") then {
if ((_itemInfo select 4) in [4096,131072]) then {
if (!(player canAdd _item) && (uiNamespace getVariable ["Weapon_Shop_Filter",0]) != 1) exitWith {_bad = (localize "STR_NOTF_NoRoom")};
};
};
if (_bad != "") exitWith {hint _bad};
if ((uiNamespace getVariable ["Weapon_Shop_Filter",0]) isEqualTo 1) then {
CASH = CASH + _price;
[_item,false] call life_fnc_handleItem;
hint parseText format [localize "STR_Shop_Weapon_Sold",_itemInfo select 1,[_price] call life_fnc_numberText];
[nil,(uiNamespace getVariable ["Weapon_Shop_Filter",0])] call life_fnc_weaponShopFilter; //Update the menu.
} else {
private _altisArray = ["Land_u_Barracks_V2_F","Land_i_Barracks_V2_F"];
private _tanoaArray = ["Land_School_01_F","Land_Warehouse_03_F","Land_House_Small_02_F"];
private _hideoutObjs = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;
private _hideout = (nearestObjects[getPosATL player,_hideoutObjs,25]) select 0;
if (!isNil "_hideout" && {!isNil {group player getVariable "gang_bank"}} && {(group player getVariable "gang_bank") >= _price}) then {
_action = [
format [(localize "STR_Shop_Virt_Gang_FundsMSG")+ "<br/><br/>" +(localize "STR_Shop_Virt_Gang_Funds")+ " <t color='#8cff9b'>$%1</t><br/>" +(localize "STR_Shop_Virt_YourFunds")+ " <t color='#8cff9b'>$%2</t>",
[(group player getVariable "gang_bank")] call life_fnc_numberText,
[CASH] call life_fnc_numberText
],
localize "STR_Shop_Virt_YourorGang",
localize "STR_Shop_Virt_UI_GangFunds",
localize "STR_Shop_Virt_UI_YourCash"
] call BIS_fnc_guiMessage;
if (_action) then {
hint parseText format [localize "STR_Shop_Weapon_BoughtGang",_itemInfo select 1,[_price] call life_fnc_numberText];
_funds = group player getVariable "gang_bank";
_funds = _funds - _price;
group player setVariable ["gang_bank",_funds,true];
[_item,true] spawn life_fnc_handleItem;
if (life_HC_isActive) then {
[1,group player] remoteExecCall ["HC_fnc_updateGang",HC_Life];
} else {
[1,group player] remoteExecCall ["TON_fnc_updateGang",RSERV];
};
} else {
if (_price > CASH) exitWith {hint localize "STR_NOTF_NotEnoughMoney"};
hint parseText format [localize "STR_Shop_Weapon_BoughtItem",_itemInfo select 1,[_price] call life_fnc_numberText];
CASH = CASH - _price;
[_item,true] spawn life_fnc_handleItem;
};
} else {
if (_price > CASH) exitWith {hint localize "STR_NOTF_NotEnoughMoney"};
hint parseText format [localize "STR_Shop_Weapon_BoughtItem",_itemInfo select 1,[_price] call life_fnc_numberText];
CASH = CASH - _price;
[_item,true] spawn life_fnc_handleItem;
};
};
[0] call SOCK_fnc_updatePartial;
[] call life_fnc_saveGear;
Danach läuft es , ich bitte euch, mach trotzdem ein Backup bevor ihr das Übernimmt
-
Hay, ich habe das Problem, das ich
ein Perso erstellen will, dann füll ich alles aus und dann Personalausweis Beantragen und dann
kommt das ausfüll formular wiederFehler in den Logs :
20:29:08 "extDB3: Protocol Error: [0,""Error MariaDBQueryException Exception""]" -
Habe das problem ,
das ich nach dem join nur schwarzen Bildschirm habe und es steht da
Überprüfe Daten des Personalausweisses
Datenbank extDB3
Version 5.0