Beiträge von AmaZiinG
-
-
Dann bräuchte ich mal Client & RPT-Logs
-
Leider nicht.
-
Könnte man ja umschreiben für Apex Autos mit Koordinaten und Klassen oder?
Natürlich
-
Welches Fahrzeug hast du getestet ?
Es gehen nur diese:
"C_Offroad_01_F",
"B_MRAP_01_F",
"C_Van_01_transport_F",
"C_Van_01_box_F",
"C_Hatchback_01_F",
"I_MRAP_03_F",
"B_Truck_01_transport_F",
"B_Truck_01_covered_F",
"B_Truck_01_fuel_F",
"B_Truck_01_ammo_F",
"B_Truck_01_Repair_F",
"B_Truck_01_mover_F",
"B_Truck_01_box_F",
"C_SUV_01_FKannst natürlich auch mehr einfügen.
-
Autor: XtG Community
1. Geht in eure Init.sqf im Misson Verzeichnis und schreibt folgendes rein:
2. Öffnet eure Function.hpp und fügt folgendes ein:
Codeclass ALRPG_INDICATORSYSTEM { file = "scripts\indicators"; class leftIndicatorLight {}; class rightIndicatorLight {}; class startIndicatorLeft {}; class startIndicatorRight {}; };
3. Fügt in eure CfgRemoteExec.hpp folgendes ein:
4. Öffnet eure description.ext und fügt unter class Sounds folgendes ein:
Code
Alles anzeigenclass blinkerclick { name = "blinkerclick"; sound[] = {"sounds\blinkerclick_sfx.ogg", 1.0, 1}; titles[] = {}; }; class blinkerstart { name = "blinkerstart"; sound[] = {"sounds\blinkerstart_sfx.ogg", 1.0, 1}; titles[] = {}; };
5. Ladet euch die Sounds.rar und indicators.rar herunter und fügt sie in die folgende Verzeichnisse ein:
Sounds.rar --> Sounds
indicators.rar ---> Scripts (Wenn ihr keinen Scripts Ordner habt einfach einen erstellen)
Fertig !
-
-
Autor: !ITS Jordan
Wie funktioniert es ?
A: Ihr braucht einfach nur zum ATM gehen und auf alles Einzahlen drücken ohne etwas einzugeben.
Erstellt einfach eine neue SQF namens fn_bankDepositAllund kopiert folgendes in die SQF rein:
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_bankDeposit.sqf Author: !ITS Jordan Description: Cash */ private ["_value"]; _value = CASH; //Series of stupid checks if (_value > 999999) exitWith {hint localize "STR_ATM_GreaterThan";}; if (_value < 0) exitWith {}; if (!([str(_value)] call TON_fnc_isnumber)) exitWith {hint localize "STR_ATM_notnumeric"}; if (_value > CASH) exitWith {hint localize "STR_ATM_NotEnoughCash"}; CASH = CASH - _value; BANK = BANK + _value; hint format [localize "STR_ATM_DepositSuccess",[_value] call life_fnc_numberText]; [] call life_fnc_atmMenu; [6] call SOCK_fnc_updatePartial; if (LIFE_SETTINGS(getNumber,"player_moneyLog") isEqualTo 1) then { if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then { money_log = format [localize "STR_DL_ML_depositedBank_BEF",_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText]; } else { money_log = format [localize "STR_DL_ML_depositedBank",profileName,(getPlayerUID player),_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText]; }; publicVariableServer "money_log"; };
Schreibt in der Function.hpp unter class Dialog_Controls { folgendes rein:
Jetzt müsst ihr in der Bank.hpp nur noch einen Button erstellen. Hier ist meins (nicht perfekt):
Codeclass DepositALLButton: Life_RscButtonMenu { idc = -1; text = "$STR_ATM_DepositALL"; //Muss in der Stringtable eingetragen werden !!! colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; onButtonClick = "[] call life_fnc_bankDepositAll"; x = 0.425; y = 0.518; w = (6 / 40); h = (1 / 25); };
Fertig !
-
Danke funktioniert jetzt
-
Ich habe es so verschoben wie du es im Beispiel gezeigt hast. Leider bekomme ich den gleichen Fehler.
-
fn_requestReceived.sqf
life_houses = _this select 13; <- Da sind nun ??? nichts?
life_gangData = _this select 14; <- Da sind nun ??? nichts?
Dein array sieht in etwa so nun aus....,"Position","","","","","keys","Bank PIN","Playtime","house","gang"] (select 10,11, 12, 13, 14, 15, 16, 17, 18)
Da die Playtime, Häuser und die Gang per pushback ans vorhandene array angehängt wird, sieht das nun so aus.Ich weiß jetzt nicht was du meinst könntest du das vllt ein wenig anders erklären ?
-
Ich habe die fn_queryRequest erweitert.
Aber ich denke nicht das ich einen Fehler gemacht habe.
Code
Alles anzeigen#include "\life_server\script_macros.hpp" /* 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","_queryResult","_tickTime","_tmp"]; _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; _query = switch (_side) do { // West - 11 entries returned case west: {format["SELECT playerid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, banking_pin FROM players WHERE playerid='%1'",_uid];}; // Civilian - 12 entries returned case civilian: {format["SELECT playerid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, banking_pin FROM players WHERE playerid='%1'",_uid];}; // Independent - 10 entries returned case independent: {format["SELECT playerid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime, banking_pin FROM players WHERE playerid='%1'",_uid];}; // East - 10 entries returned case east: {format["SELECT playerid, name, cash, bankacc, adminlevel, donorlevel, adac_licenses, adaclevel, adac_gear, adac_stats, playtime, banking_pin FROM players WHERE playerid='%1'",_uid];}; }; _tickTime = diag_tickTime; _queryResult = [_query,2] call DB_fnc_asyncCall; if (EXTDB_SETTING(getNumber,"DebugMode") isEqualTo 1) then { 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 (_queryResult isEqualType "") exitWith { [] remoteExecCall ["SOCK_fnc_insertPlayerInfo",_ownerID]; }; if (count _queryResult isEqualTo 0) exitWith { [] remoteExecCall ["SOCK_fnc_insertPlayerInfo",_ownerID]; }; //Blah conversion thing from a2net->extdb _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 (_new isEqualType "") 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 (_new isEqualType "") then {_new = call compile format["%1", _new];}; _queryResult set[8,_new]; //Parse data for specific side. switch (_side) do { case west: { _queryResult set[9,([_queryResult select 9,1] call DB_fnc_bool)]; //Parse Stats _new = [(_queryResult select 10)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _queryResult set[10,_new]; //Playtime _new = [(_queryResult select 11)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if (_index != -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 0] call TON_fnc_setPlayTime; //Bank PIN _tmp = _queryResult select 12; _queryResult set[16,[_tmp] call DB_fnc_numberSafe]; }; case civilian: { _queryResult set[7,([_queryResult select 7,1] call DB_fnc_bool)]; //Parse Stats _new = [(_queryResult select 9)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _queryResult set[9,_new]; //Position _queryResult set[10,([_queryResult select 10,1] call DB_fnc_bool)]; _new = [(_queryResult select 11)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _queryResult set[11,_new]; //Bank PIN _tmp = _queryResult select 13; _queryResult set[16,[_tmp] call DB_fnc_numberSafe]; //Playtime _new = [(_queryResult select 12)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if (_index != -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 2] call TON_fnc_setPlayTime; _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],[]]); }; case independent: { //Parse Stats _new = [(_queryResult select 9)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _queryResult set[9,_new]; //Playtime _new = [(_queryResult select 10)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if (_index != -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 1] call TON_fnc_setPlayTime; //Bank PIN _tmp = _queryResult select 11; _queryResult set[16,[_tmp] call DB_fnc_numberSafe]; }; case east: { //Pa* * e Stats _new = [(_queryResult select 9)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _queryResult set[9,_new]; //Playtime _new = [(_queryResult select 10)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if (_index != -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 1] call TON_fnc_setPlayTime; }; }; publicVariable "TON_fnc_playtime_values_request"; _keyArr = missionNamespace getVariable [format["%1_KEYS_%2",_uid,_side],[]]; _queryResult set[15,_keyArr]; _queryResult remoteExec ["SOCK_fnc_requestReceived",_ownerID];
-
Hey Leute,
zur Zeit installiere ich auf meinen Server das Erweiterte Banking System. Bei Cops und Medics funktioniert es ohne Fehler. Nur bei den Civis bekomme ich folgenden Error im Client Log raus:
Code
Alles anzeigen13:34:53 "----------------------------------------------------------------------------------------------------" 13:34:53 "--------------------------------- Starting Altis Life Client Init ----------------------------------" 13:34:53 "------------------------------------------ Version 4.4R3 -------------------------------------------" 13:34:53 "----------------------------------------------------------------------------------------------------" 13:34:53 "::Life Client:: Initialization Variables" 13:34:53 "::Life Client:: Variables initialized" 13:34:53 "::Life Client:: Setting up Eventhandlers" 13:34:53 "::Life Client:: Eventhandlers completed" 13:34:53 "::Life Client:: Setting up user actions" 13:34:53 "::Life Client:: User actions completed" 13:34:53 "::Life Client:: Waiting for server functions to transfer.." 13:34:53 "::Life Client:: Received server functions." 13:34:53 "::Life Client:: Waiting for the server to be ready.." 13:34:53 Mission id: af152533d9efec0ea14621965065415229d52bae 13:34:53 Error in expression <use"]; life_vehicles pushBack _house; } forEach life_houses; life_gangData = _t> 13:34:53 Error position: <forEach life_houses; life_gangData = _t> 13:34:53 Error foreach: Typ Zahl, erwartet Array 13:34:53 File mpmissions\__CUR_MP.Jackson_County\core\session\fn_requestReceived.sqf, line 90 13:36:36 SimulWeather - Cloud Renderer - noise texture file is not specified! 13:36:36 Deinitialized shape [Class: "C_Soldier_VR_F"; Shape: "a3\characters_f_bootcamp\common\vr_soldier_f.p3d";] 13:36:36 Deinitialized shape [Class: "Underwear_F"; Shape: "a3\characters_f\common\basicbody.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_w_worker_F"; Shape: "a3\characters_f\common\coveralls.p3d";] 13:36:36 Deinitialized shape [Class: "B_diver_F"; Shape: "a3\characters_f\common\diver_slotable.p3d";] 13:36:36 Deinitialized shape [Class: "O_Soldier_F"; Shape: "a3\characters_f\opfor\o_soldier_01.p3d";] 13:36:36 Deinitialized shape [Class: "C_Nikos_aged"; Shape: "a3\characters_f_epc\civil\c_nikos_aged.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_hunter_1_F"; Shape: "a3\characters_f\civil\c_hunter_f.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_p_beggar_F_afro"; Shape: "a3\characters_f\civil\c_poor.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_p_fugitive_F_asia"; Shape: "a3\characters_f\civil\c_poor.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_p_fugitive_F"; Shape: "a3\characters_f\civil\c_poor.p3d";] 13:36:36 Deinitialized shape [Class: "B_RangeMaster_F"; Shape: "a3\characters_f\civil\c_poloshirtpants.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_1"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_polo_3_F"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_polo_6_F"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_p_shorts_1_F_afro"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_shorts_3_F_euro"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_polo_5_F"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_polo_4_F"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_polo_2_F"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 Deinitialized shape [Class: "C_man_polo_1_F"; Shape: "a3\characters_f\civil\c_poloshirt.p3d";] 13:36:36 c:\w\stable\futura\lib\network\networkserver.cpp ClearNetServer:NOT IMPLEMENTED - briefing! 13:36:38 Extensions:
Hier mal meine requestReceived:
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_requestReceived.sqf Author: Bryan "Tonic" Boardwine Description: Called by the server saying that we have a response so let's sort through the information, validate it and if all valid set the client up. */ private["_array"]; life_session_tries = life_session_tries + 1; if (life_session_completed) exitWith {}; //Why did this get executed when the client already initialized? if (life_session_tries > 3) exitWith {cutText[localize "STR_Session_Error","BLACK FADED"]; 0 cutFadeOut 999999999;}; 0 cutText [localize "STR_Session_Received","BLACK FADED"]; 0 cutFadeOut 9999999; if (isNil "_this") exitWith {[] call SOCK_fnc_insertPlayerInfo;}; if (_this isEqualType "") exitWith {[] call SOCK_fnc_insertPlayerInfo;}; if (count _this isEqualTo 0) exitWith {[] call SOCK_fnc_insertPlayerInfo;}; if ((_this select 0) isEqualTo "Error") exitWith {[] call SOCK_fnc_insertPlayerInfo;}; if (!(getPlayerUID player isEqualTo (_this select 0))) exitWith {[] call SOCK_fnc_dataQuery;}; if (!isServer && (!isNil "life_adminlevel" || !isNil "life_coplevel" || !isNil "life_donorlevel")) exitWith { [profileName,getPlayerUID player,"VariablesAlreadySet"] remoteExecCall ["SPY_fnc_cookieJar",RSERV]; [profileName,format["Variables set before client initialization...\nlife_adminlevel: %1\nlife_coplevel: %2\nlife_donorlevel: %3",life_adminlevel,life_coplevel,life_donorlevel]] remoteExecCall ["SPY_fnc_notifyAdmins",RCLIENT]; sleep 0.9; failMission "SpyGlass"; }; //Parse basic player information. CASH = parseNumber (_this select 2); BANK = parseNumber (_this select 3); life_bankingpin = parseNumber (_this select 16); //Banking Eintrag ! CONST(life_adminlevel,parseNumber (_this select 4)); if (LIFE_SETTINGS(getNumber,"donor_level") isEqualTo 1) then { CONST(life_donorlevel,parseNumber (_this select 5)); } else { CONST(life_donorlevel,0); }; //Loop through licenses if (count (_this select 6) > 0) then { {missionNamespace setVariable [(_x select 0),(_x select 1)];} forEach (_this select 6); }; life_gear = _this select 8; [true] call life_fnc_loadGear; //Parse side specific information. switch (playerSide) do { case west: { CONST(life_coplevel, parseNumber(_this select 7)); CONST(life_medicLevel,0); life_blacklisted = _this select 9; if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then { life_hunger = ((_this select 10) select 0); life_thirst = ((_this select 10) select 1); player setDamage ((_this select 10) select 2); }; }; case civilian: { life_is_arrested = _this select 7; CONST(life_coplevel, 0); CONST(life_medicLevel, 0); life_houses = _this select 13; if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then { life_hunger = ((_this select 9) select 0); life_thirst = ((_this select 9) select 1); player setDamage ((_this select 9) select 2); }; //Position if (LIFE_SETTINGS(getNumber,"save_civilian_position") isEqualTo 1) then { life_is_alive = _this select 10; life_civ_position = _this select 11; if (life_is_alive) then { if (count life_civ_position != 3) then {diag_log format["[requestReceived] Bad position received. Data: %1",life_civ_position];life_is_alive =false;}; if (life_civ_position distance (getMarkerPos "respawn_civilian") < 300) then {life_is_alive = false;}; }; }; { _house = nearestObject [(call compile format["%1",(_x select 0)]), "House"]; life_vehicles pushBack _house; } forEach life_houses; life_gangData = _this select 14; if (!(count life_gangData isEqualTo 0)) then { [] spawn life_fnc_initGang; }; [] spawn life_fnc_initHouses; }; case independent: { CONST(life_medicLevel, parseNumber(_this select 7)); CONST(life_coplevel,0); if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then { life_hunger = ((_this select 9) select 0); life_thirst = ((_this select 9) select 1); player setDamage ((_this select 9) select 2); }; }; case east: { CONST(life_adaclevel, parseNumber(_this select 7)); CONST(life_coplevel,0); if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then { life_hunger = ((_this select 9) select 0); life_thirst = ((_this select 9) select 1); player setDamage ((_this select 9) select 2); }; }; }; if (count (_this select 16) > 0) then { {life_vehicles pushBack _x;} forEach (_this select 15); }; life_session_completed = true;
Ich hoffe das mir jemand weiter helfen kann.
Mfg
AmaZiinG
-
-
Du brauchst auch dafür ein script um die polyline roads zu sehen im Bulldozer.
-
okay danke nochmal.
-
Wie kann man den Rcon Port ändern ? das hier nicht Standard auf 2309 ist-
-
Wie sieht das eigentlich aus wenn ich mehrer Server habe auf meinen Root habe ?
-
Bruh
Okay funktioniert jetzt danke @PoweredByte und @Don
-