das wird für die 4.5 nicht gehen oder? gibt es schon ein skill system für de 4.5 ?
PapaBear's Persistent Proficiency System 3.1.4.8
-
- Altis Life
-
AmaZiinG -
20. September 2016 um 16:54
Hinweis zur Zukunft von Nodezone
Das neue Nodezone befindet sich in der finalen Entwicklungsphase. Mit dem geplanten Start wird das bisherige Forum auf Read Only umgestellt und künftig als Archiv erhalten bleiben.
Alle Informationen zur neuen Plattform, zur Accountübernahme und zum weiteren Ablauf findest du hier: Zum aktuellen Nodezone Beitrag
Das neue Nodezone befindet sich in der finalen Entwicklungsphase. Mit dem geplanten Start wird das bisherige Forum auf Read Only umgestellt und künftig als Archiv erhalten bleiben.
Alle Informationen zur neuen Plattform, zur Accountübernahme und zum weiteren Ablauf findest du hier: Zum aktuellen Nodezone Beitrag
-
-
Du könntest es umschreiben auf die 4.5

-
dafür hab ich leider noch nicht genug erfahrung im scripten um es umzuschreiben sry
-
Code: fn_queryRequest.sqf
Alles anzeigen/* File: fn_queryRequest.sqf Author: Bryan "Tonic" Boardwine Description: Handles the incoming request and sends an asynchronous query request to the database. Return: ARRAY - If array has 0 elements it should be handled as an error in client-side files. STRING - The request had invalid handles or an unknown error and is logged to the RPT. */ private["_uid","_side","_query","_return","_queryResult","_qResult","_handler","_thread","_tickTime","_loops","_returnCount"]; _uid = [_this,0,"",[""]] call BIS_fnc_param; _side = [_this,1,sideUnknown,[civilian]] call BIS_fnc_param; _ownerID = [_this,2,ObjNull,[ObjNull]] call BIS_fnc_param; if(isNull _ownerID) exitWith {}; _ownerID = owner _ownerID; /* _returnCount is the count of entries we are expecting back from the async call. The other part is well the SQL statement. */ _query = switch(_side) do { case west: {_returnCount = 10; format["SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, cop_licenses, coplevel, cop_gear, cop_prof, blacklist FROM players WHERE playerid='%1'",_uid];}; case civilian: {_returnCount = 9; format["SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, civ_licenses, arrested, civ_gear, civ_prof FROM players WHERE playerid='%1'",_uid];}; case independent: {_returnCount = 9; format["SELECT playerid, name, cash, bankacc, adminlevel, donatorlvl, med_licenses, mediclevel, med_gear, med_prof FROM players WHERE playerid='%1'",_uid];}; }; waitUntil{sleep (random 0.3); !DB_Async_Active}; _tickTime = diag_tickTime; _queryResult = [_query,2] call DB_fnc_asyncCall; diag_log "------------- Client Query Request -------------"; diag_log format["QUERY: %1",_query]; diag_log format["Time to complete: %1 (in seconds)",(diag_tickTime - _tickTime)]; diag_log format["Result: %1",_queryResult]; diag_log "------------------------------------------------"; if(typeName _queryResult == "STRING") exitWith { [[],"SOCK_fnc_insertPlayerInfo",_ownerID,false,true] spawn life_fnc_MP; }; if(count _queryResult == 0) exitWith { [[],"SOCK_fnc_insertPlayerInfo",_ownerID,false,true] spawn life_fnc_MP; }; //Blah conversion thing from a2net->extdb private["_tmp"]; _tmp = _queryResult select 2; _queryResult set[2,[_tmp] call DB_fnc_numberSafe]; _tmp = _queryResult select 3; _queryResult set[3,[_tmp] call DB_fnc_numberSafe]; //Parse licenses (Always index 6) _new = [(_queryResult select 6)] call DB_fnc_mresToArray; if(typeName _new == "STRING") then {_new = call compile format["%1", _new];}; _queryResult set[6,_new]; //Convert tinyint to boolean _old = _queryResult select 6; for "_i" from 0 to (count _old)-1 do { _data = _old select _i; _old set[_i,[_data select 0, ([_data select 1,1] call DB_fnc_bool)]]; }; _queryResult set[6,_old]; _new = [(_queryResult select 8)] call DB_fnc_mresToArray; if(typeName _new == "STRING") then {_new = call compile format["%1", _new];}; _queryResult set[8,_new]; //PROFICENCYS //Parse licenses (Always index 9) _new = [(_queryResult select 9)] call DB_fnc_mresToArray; if(typeName _new == "STRING") then {_new = call compile format["%1", _new];}; _queryResult set[9,_new]; //Convert string to number _old = _queryResult select 9; for "_i" from 0 to (count _old)-1 do { _data = _old select _i; _old set[_i,[_data select 0, ([_data select 1,1] call DB_fnc_numberSafe),([_data select 2,1] call DB_fnc_numberSafe) ]]; }; _queryResult set[9,_old]; //Parse data for specific side. switch (_side) do { case west: { _queryResult set[10,([_queryResult select 10,1] call DB_fnc_bool)]; }; case civilian: { _queryResult set[7,([_queryResult select 7,1] call DB_fnc_bool)]; _houseData = _uid spawn TON_fnc_fetchPlayerHouses; waitUntil {scriptDone _houseData}; _queryResult pushBack (missionNamespace getVariable[format["houses_%1",_uid],[]]); _gangData = _uid spawn TON_fnc_queryPlayerGang; waitUntil{scriptDone _gangData};_queryResult pushBack (missionNamespace getVariable[format["gang_%1",_uid],[]]); }; }; _keyArr = missionNamespace getVariable [format["%1_KEYS_%2",_uid,_side],[]]; _queryResult set[13,_keyArr]; [_queryResult,"SOCK_fnc_requestReceived",_ownerID,false] spawn life_fnc_MP; -
Habe es mal verbessert. Danke Dingo
-
Code
Alles anzeigenclass Life_Prof_Dialog { idd = 7730; name = "life_prof_dialog"; movingEnabled = false; enableSimulation = true; class controlsBackground { class Frame: Life_RscText { colorBackground[] = {0, 0, 0, 0.7}; idc = -1; x = 10.5 * GUI_GRID_W + GUI_GRID_X; y = 2 * GUI_GRID_H + GUI_GRID_Y; w = 18 * GUI_GRID_W; h = 18 * GUI_GRID_H; }; class Title: Life_RscText { idc = -1; text = "Proficicency Levels"; //--- ToDo: Localize; x = 15.5 * GUI_GRID_W + GUI_GRID_X; y = 2.5 * GUI_GRID_H + GUI_GRID_Y; w = 8.5 * GUI_GRID_W;h = 1 * GUI_GRID_H; }; }; class controls { class Prof_Text: Life_RscStructuredText { idc = 7731; x = 11 * GUI_GRID_W + GUI_GRID_X; y = 4 * GUI_GRID_H + GUI_GRID_Y; w = 5 * GUI_GRID_W; h = 13.5 * GUI_GRID_H; }; class Prof2_Text: Life_RscStructuredText { idc = 7732; x = 16 * GUI_GRID_W + GUI_GRID_X; y = 4 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 13.5 * GUI_GRID_H; }; class Prof3_Text: Life_RscStructuredText { idc = 7733; x = 20 * GUI_GRID_W + GUI_GRID_X; y = 4 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 13.5 * GUI_GRID_H; }; class CloseBTN: Life_RscButtonMenu { idc = -1; text = "Close"; //--- ToDo: Localize; onButtonClick = "closeDialog 0;"; x = 22 * GUI_GRID_W + GUI_GRID_X; y = 18 * GUI_GRID_H + GUI_GRID_Y; w = 6 * GUI_GRID_W; h = 1.5 * GUI_GRID_H; }; }; }; -
-
Mit diesem Dialog ist das Problem mit der KL Einheiten weg
habe alles getestet läuft wunderbare
danke an
AmaZiinGfür das Tutorial
-
Also mit dieser Verbesserung sollte das Systwm jetzt gehen ohne Fehler oder?
Danke dingo für deine Zeit und hilfe! -
ja geht ohne Fehler man kann das System in z Inventar offen man sieht das skillsystem
man bekommt beim Farmen die skillpunkte und wird auch gespeichert in der Datenbank
-
ok danke für den fix weitere fehler gab es nicht richtig?
-
-
-