Geht das auch für die 4.4 ?
Beiträge von AmaZiinG
-
-
-
Ich habe das AUKTIONSHAUS für die 4.4 kann dir gerne die Dateien schicken, wenn du willst.
Mfg
AmaZiinG
-
-
Habe immer noch ein Error
Code
Alles anzeigen20:36:30 Error in expression <er; }; }; if (isPlayer _curTarget && _curObject isKindOf "Man") then { if (!d> 20:36:30 Error position: <_curObject isKindOf "Man") then { if (!d> 20:36:30 Error Nicht definierte Variable in Ausdruck: _curobject 20:36:30 File mpmissions\__CUR_MP.Chernarus_summer\core\functions\fn_actionKeyHandler.sqf, line 79 20:36:31 Error in expression <er; }; }; if (isPlayer _curTarget && _curObject isKindOf "Man") then { if (!d> 20:36:31 Error position: <_curObject isKindOf "Man") then { if (!d> 20:36:31 Error Nicht definierte Variable in Ausdruck: _curobject 20:36:31 File mpmissions\__CUR_MP.Chernarus_summer\core\functions\fn_actionKeyHandler.sqf, line 79 20:36:31 Error in expression <er;
-
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_copInteractionMenu.sqf Author: Bryan "Tonic" Boardwine Description: Replaces the mass addactions for various cop actions towards another player. */ #define Btn1 37450 #define Btn2 37451 #define Btn3 37452 #define Btn4 37453 #define Btn5 37454 #define Btn6 37455 #define Btn7 37456 #define Btn8 37457 #define Title 37401 private["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7"]; disableSerialization; _curTarget = param [0,ObjNull,[ObjNull]]; if(isNull _curTarget) exitWith {closeDialog 0;}; //Bad target if(!dialog) then { createDialog "pInteraction_Menu"; }; if(!isPlayer _curTarget && side _curTarget == civilian) exitWith {closeDialog 0;}; //Bad side check? if(player distance _curTarget > 4 ) exitWith {closeDialog 0;}; // Prevents menu accessing from far distances. _display = findDisplay 37400; _Btn1 = _display displayCtrl Btn1; _Btn2 = _display displayCtrl Btn2; _Btn3 = _display displayCtrl Btn3; _Btn4 = _display displayCtrl Btn4; _Btn5 = _display displayCtrl Btn5; _Btn6 = _display displayCtrl Btn6; _Btn7 = _display displayCtrl Btn7; life_pInact_curTarget = _curTarget; //Set Unrestrain Button _Btn1 ctrlSetText localize "STR_pInAct_Unrestrain"; _Btn1 buttonSetAction "[life_pInact_curTarget] call life_fnc_unrestrain; closeDialog 0;"; //Set Check Licenses Button _Btn2 ctrlSetText localize "STR_pInAct_checkLicenses"; _Btn2 buttonSetAction "[player] remoteExecCall [""life_fnc_licenseCheck"",life_pInact_curTarget];"; //Set Search Button _Btn3 ctrlSetText localize "STR_pInAct_SearchPlayer"; _Btn3 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_searchAction; closeDialog 0;"; //Set Escort Button if((_curTarget getVariable["Escorting",false])) then { _Btn4 ctrlSetText localize "STR_pInAct_StopEscort"; _Btn4 buttonSetAction "[life_pInact_curTarget] call life_fnc_stopEscorting; [life_pInact_curTarget] call life_fnc_copInteractionMenu;"; } else { _Btn4 ctrlSetText localize "STR_pInAct_Escort"; _Btn4 buttonSetAction "[life_pInact_curTarget] call life_fnc_escortAction; closeDialog 0;"; }; //Set Ticket Button _Btn5 ctrlSetText localize "STR_pInAct_TicketBtn"; _Btn5 buttonSetAction "[life_pInact_curTarget] call life_fnc_ticketAction;"; _Btn6 ctrlSetText localize "STR_pInAct_Arrest"; _Btn6 buttonSetAction "closeDialog 0; [] call life_fnc_showArrestDialog;"; _Btn7 ctrlSetText localize "STR_pInAct_PutInCar"; _Btn7 buttonSetAction "[life_pInact_curTarget] call life_fnc_putInCar;"; //Check that you are near a place to jail them. if(!((player distance (getMarkerPos "police_hq_1") < 30) OR (player distance (getMarkerPos "police_hq_2") < 30) OR (player distance (getMarkerPos "cop_spawn_3") < 30) OR (player distance (getMarkerPos "cop_spawn_5") < 30))) then { if !(_curObject getVariable ["restrained",false]) then { _Btn1 ctrlEnable false; _Btn6 ctrlEnable false; };
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_actionKeyHandler.sqf Author: Bryan "Tonic" Boardwine Description: Master action key handler, handles requests for picking up various items and interacting with other players (Cops = Cop Menu for unrestrain,escort,stop escort, arrest (if near cop hq), etc). */ private["_curTarget","_isWater","_CrateModelNames","_crate"]; _curTarget = cursorTarget; if(life_action_inUse) exitWith {}; //Action is in use, exit to prevent spamming. if(life_interrupted) exitWith {life_interrupted = false;}; _isWater = surfaceIsWater (visiblePositionASL player); if(EQUAL(LIFE_SETTINGS(getNumber,"global_ATM"),1)) then{ //Check if the player is near an ATM. if((call life_fnc_nearATM) && {!dialog}) exitWith { [] call life_fnc_atmMenu; }; }; if(isNull _curTarget) exitWith { if(_isWater) then { private "_fish"; _fish = (nearestObjects[visiblePosition player,["Fish_Base_F"],3]) select 0; if(!isNil "_fish") then { [_fish] call life_fnc_catchFish; }; } else { _animals = [position player, ["Sheep_random_F","Goat_random_F","Hen_random_F","Cock_random_F","Rabbit_F"], 3.5] call life_fnc_nearestObjects; if (count _animals > 0) then { _animal = _animals select 0; if (!alive _animal) then { [_animal] call life_fnc_gutAnimal; }; } else { if(playerSide == civilian && !life_action_gathering) then { if(life_action_gathering) exitWith {}; //Action is in use, exit to prevent spamming. life_action_gathering = true; _handle = [] spawn life_fnc_gather; waitUntil {scriptDone _handle}; life_action_gathering = false; }; }; }; }; if((_curTarget isKindOf "B_supplyCrate_F" OR _curTarget isKindOf "Box_IND_Grenades_F") && {player distance _curTarget < 3} ) exitWith { if(alive _curTarget) then { [_curTarget] call life_fnc_containerMenu; }; }; if(_curTarget isKindOf "House_F" && {player distance _curTarget < 12} OR ((nearestObject [[16019.5,16952.9,0],"Land_Dome_Big_F"]) == _curTarget OR (nearestObject [[16019.5,16952.9,0],"Land_Research_house_V1_F"]) == _curTarget)) exitWith { [_curTarget] call life_fnc_houseMenu; }; if(dialog) exitWith {}; //Don't bother when a dialog is open. if(vehicle player != player) exitWith {}; //He's in a vehicle, cancel! life_action_inUse = true; //Temp fail safe. [] spawn { sleep 60; life_action_inUse = false; }; //Check if it's a dead body. if(_curTarget isKindOf "Man" && {!alive _curTarget} && !(_curTarget GVAR["Revive",false]) && {playerSide in [west,independent]}) exitWith { //Hotfix code by ins0 if(((playerSide == west && {(EQUAL(LIFE_SETTINGS(getNumber,"revive_cops"),1))}) || playerSide == independent) && {"Medikit" in (items player)}) then { [_curTarget] call life_fnc_revivePlayer; }; }; //If target is a player then check if we can use the cop menu. if (isPlayer _curTarget && _curObject isKindOf "Man") then { if (!dialog && playerSide isEqualTo west) then { [_curObject] call life_fnc_copInteractionMenu; }; }; } else { //OK, it wasn't a player so what is it? private["_isVehicle","_miscItems","_money","_list"]; _list = ["landVehicle","Ship","Air"]; _isVehicle = if(KINDOF_ARRAY(_curTarget,_list)) then {true} else {false}; _miscItems = ["Land_BottlePlastic_V1_F","Land_TacticalBacon_F","Land_Can_V3_F","Land_CanisterFuel_F","Land_Suitcase_F"]; _animalTypes = ["Salema_F","Ornate_random_F","Mackerel_F","Tuna_F","Mullet_F","CatShark_F","Turtle_F"]; _money = "Land_Money_F"; //It's a vehicle! open the vehicle interaction key! if(_isVehicle) then { if(!dialog) then { if(player distance _curTarget < SEL(SEL(boundingBox _curTarget,1),0)+2) then { [_curTarget] call life_fnc_vInteractionMenu; }; }; } else { //Is it a animal type? if((typeOf _curTarget) in _animalTypes) then { if(EQUAL((typeOf _curTarget),"Turtle_F") && !alive _curTarget) then { private "_handle"; _handle = [_curTarget] spawn life_fnc_catchTurtle; waitUntil {scriptDone _handle}; } else { private "_handle"; _handle = [_curTarget] spawn life_fnc_catchFish; waitUntil {scriptDone _handle}; }; } else { //OK, it wasn't a vehicle so let's see what else it could be? if((typeOf _curTarget) in _miscItems) then { [_curTarget,player,false] remoteExecCall ["TON_fnc_pickupAction",RSERV]; } else { //It wasn't a misc item so is it money? if(EQUAL((typeOf _curTarget),_money) && {!(_curTarget GVAR ["inUse",false])}) then { [_curTarget,player,true] remoteExecCall ["TON_fnc_pickupAction",RSERV]; }; }; }; }; };
-
Bekomme diesen Fehler:
Code
Alles anzeigen17:15:45 Error in expression <call life_fnc_copInteractionMenu; }; }; } else { private["_isVehicle","_miscIte> 17:15:45 Error position: <} else { private["_isVehicle","_miscIte> 17:15:45 Error Missing { 17:15:45 File mpmissions\RemakeLife.Chernarus_summer\core\functions\fn_actionKeyHandler.sqf, line 84 17:15:45 Error in expression <call life_fnc_copInteractionMenu; }; }; } else { private["_isVehicle","_miscIte> 17:15:45 Error position: <} else { private["_isVehicle","_miscIte> 17:15:45 Error Missing { 17:15:45 File mpmissions\RemakeLife.Chernarus_summer\core\functions\fn_actionKeyHandler.sqf, line 84
-
Hi habe es grade mal ebend überflogen,
hab es vor Ewigkeiten auch mal bei RPG gesehen.Da fiel mir auf, dass die deutsche Übersetzung in der Stringable.xml alles gleich ist, dort steht überall --> <German>Öl Können</German>
Jeder der dies nutzt müsste das halt ebend noch selbst umschreiben.Lob an dich AmaZiinG
dafür dass du dir die mühe gemacht hast es zu übersetzen.Gruß Ty
Das war das kleinste Problem
Es war viel schwieriger die ganzen 3 sqfs richtig wieder hinzurücken, vorher war alles auf einer Zeile.
-
14. Ersetzt in der fn_QueryRequest.sqf alles durch das:
Danke an dingo !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],[]]); }; };
DATENBANK !
Fügt das in eure Datenbank ein:
CodeALTER TABLE `arma3life`.`players` ADD COLUMN `cop_prof` TEXT NULL DEFAULT NULL AFTER `blacklist`,ADD COLUMN `civ_prof` TEXT NULL DEFAULT NULL AFTER `cop_prof`,ADD COLUMN `med_prof` TEXT NULL DEFAULT NULL AFTER `civ_prof`;
So jetzt seid ihr Fertig, wenn es Probleme gibt schreibt es unter dem Tutorial !
-
Mission:
1. Geht in die Functions.h und schreibt unter class Functions das:
tragt unterclass Config das ein:2. Schreibt folgendes in eure Masterhandler.h ein:
3. Stringable.xml fügt ihr ganz unten das ein:
Code
Alles anzeigen<Package name="Life_Prof"> <Key ID="STR_Prof_Oil"> <Original>Oil Proficiency</Original> <English>Oil Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Sand"> <Original>Sand Proficiency</Original> <English>Sand Proficiency</English> <German>Sand Können</German> <French>compétence d'sable</French> <Italian>Proficiency sabbia</Italian> <Portuguese>areia de Proficiência </Portuguese> </Key> <Key ID="STR_Prof_Rock"> <Original>Rock Proficiency</Original> <English>Rock Proficiency</English> <German>Rock Können</German> <French>compétence d'rock</French> <Italian>Proficiency roccia</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Salt"> <Original>Salt Proficiency</Original> <English>Salt Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Canabis"> <Original>Cannabis Proficiency</Original> <English>Cannabis Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Heroin"> <Original>Heroin Proficiency</Original> <English>Heroin Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Cocain"> <Original>Cocaine Proficiency</Original> <English>Cocaine Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Diamond"> <Original>Diamond Proficiency</Original> <English>Diamond Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Iron"> <Original>Iron Proficiency</Original> <English>Iron Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Copper"> <Original>Copper Proficiency</Original> <English>Copper Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key> <Key ID="STR_Prof_Fruit"> <Original>Fruit Proficiency</Original> <English>Fruit Proficiency</English> <German>Öl Können</German> <French>compétence d'huile</French> <Italian>Proficiency olio</Italian> <Portuguese>Proficiência Oil</Portuguese> </Key>
4.In der Player_inv.hpp fügt ihr ganz unten das ein:
Codeclass ProfButton : life_RscButtonMenu { text = "Proficiency"; 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_profSetup; "; x = 0.11; y = 0.70; w = (5.75 / 40); h = (1 / 25); };
5.In der Fn_VarToStr.sqf im letzten case das einfügen:
Code
Alles anzeigen//Prof Block case "Oil_Prof": {(localize "STR_Prof_Oil")}; case "Iron_Prof": {(localize "STR_Prof_Iron")}; case "Copper_Prof": {(localize "STR_Prof_Copper")}; case "Rock_Prof": {(localize "STR_Prof_Rock")}; case "Fruit_Prof": {(localize "STR_Prof_Fruit")}; case "Salt_Prof": {(localize "STR_Prof_Salt")}; case "Sand_Prof": {(localize "STR_Prof_Sand")}; case "Diamond_Prof": {(localize "STR_Prof_Diamond")}; case "Cocain_Prof": {(localize "STR_Prof_Cocain")}; case "Canabis_Prof": {(localize "STR_Prof_Canabis")}; case "Heroin_Prof": {(localize "STR_Prof_Heroin")};
6. Ersetzt die fn_updateRequest durch das:
Code
Alles anzeigen/*File: fn_updateRequest.sqfAuthor: Bryan "Tonic" Boardwine Description:Ain't got time to describe it, READ THE FILE NAME!*/ private["_uid","_side","_cash","_bank","_licenses","_gear","_name","_query","_thread"]; _uid = [_this,0,"",[""]] call BIS_fnc_param; _name = [_this,1,"",[""]] call BIS_fnc_param; _side = [_this,2,sideUnknown,[civilian]] call BIS_fnc_param; _cash = [_this,3,0,[0]] call BIS_fnc_param; _bank = [_this,4,5000,[0]] call BIS_fnc_param; _licenses = [_this,5,[],[[]]] call BIS_fnc_param; _gear = [_this,6,[],[[]]] call BIS_fnc_param; _prof = [_this, 7,[],[[]]] call BIS_fnc_param; //Get to those error checks. if((_uid == "") OR (_name == "")) exitWith {}; //Parse and setup some data. _name = [_name] call DB_fnc_mresString; _gear = [_gear] call DB_fnc_mresArray; _cash = [_cash] call DB_fnc_numberSafe; _bank = [_bank] call DB_fnc_numberSafe; //Does something license related but I can't remember I only know it's important? for "_i" from 0 to count(_licenses)-1 do {_bool = [(_licenses select _i) select 1] call DB_fnc_bool; _licenses set[_i,[(_licenses select _i) select 0,_bool]]; }; _licenses = [_licenses] call DB_fnc_mresArray; _prof = [_prof] call DB_fnc_mresArray; switch (_side) do {case west: {_query = format["UPDATE players SET name='%1', cash='%2', bankacc='%3', cop_gear='%4', cop_licenses='%5', cop_prof='%7' WHERE playerid='%6'",_name,_cash,_bank,_gear,_licenses,_uid,_prof]; }; case civilian: {_query = format["UPDATE players SET name='%1', cash='%2', bankacc='%3', civ_licenses='%4', civ_gear='%6', arrested='%7', civ_prof='%8' WHERE playerid='%5'",_name,_cash,_bank,_licenses,_uid,_gear,[_this select 8] call DB_fnc_bool,_prof]; }; case independent: {_query = format["UPDATE players SET name='%1', cash='%2', bankacc='%3', med_licenses='%4', med_gear='%6',med_prof='%7' WHERE playerid='%5'",_name,_cash,_bank,_licenses,_uid,_gear,_prof]; }; }; waitUntil {sleep (random 0.3); !DB_Async_Active}; _queryResult = [_query,1] call DB_fnc_asyncCall;
7. Unter” if(has_license) then “ müsst er alles ersetzten (Fn_processaction.sqf)
Code
Alles anzeigenif(_hasLicense) then{_time = 0.3; _cpUp = 0.01; _profName = [_type] call life_fnc_profType; _data = missionNamespace getVariable "_profName"; if( _profName != "" ) then {switch ( _data select 0 ) do{case 1: { _time = 0.4; _cpUp = 0.01; }; case 2: { _time = 0.35; _cpUp = 0.01; }; case 3: { _time = 0.3; _cpUp = 0.01; }; case 4: { _time = 0.25; _cpUp = 0.01; }; case 5: { _time = 0.2; _cpUp = 0.01; }; case 6: { _time = 0.2; _cpUp = 0.02; }; case 7: { _time = 0.2; _cpUp = 0.03; }; case 8: { _time = 0.2; _cpUp = 0.04; }; case 9: { _time = 0.15; _cpUp = 0.05; }; case 10: { _time = 0.1; _cpUp = 0.07; }; }; }; while{true} do{sleep _time; _cP = _cP + _cpUp; _progress progressSetPosition _cP; _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp]; if(_cP >= 1) exitWith {}; if(player distance _vendor > 10) exitWith {}; }; if(player distance _vendor > 10) exitWith {hint localize "STR_Process_Stay"; 5 cutText ["","PLAIN"]; life_is_processing = false; }; if(!([false,_oldItem,_oldVal] call life_fnc_handleInv)) exitWith {5 cutText ["","PLAIN"]; life_is_processing = false; }; if(!([true,_newItem,_oldVal] call life_fnc_handleInv)) exitWith {5 cutText ["","PLAIN"]; [true,_oldItem,_oldVal] call life_fnc_handleInv; life_is_processing = false; }; 5 cutText ["","PLAIN"]; titleText[format[localize "STR_Process_Processed",_oldVal,_itemName],"PLAIN"]; if( _profName != "" ) then { [_profName,40] call life_fnc_addExp; }; life_is_processing = false; } else{if(life_cash < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; }; _time = 0.9; _cpUp = 0.01; _profName = [_type] call life_fnc_profType; _data = missionNamespace getVariable "_profName"; if( _profName != "" ) then {switch ( _data select 0) do{case 1: { _time = 0.9; _cpUp = 0.01; }; case 2: { _time = 0.8; _cpUp = 0.01; }; case 3: { _time = 0.7; _cpUp = 0.01; }; case 4: { _time = 0.6; _cpUp = 0.01; }; case 5: { _time = 0.5; _cpUp = 0.01; }; case 6: { _time = 0.4; _cpUp = 0.01; }; case 7: { _time = 0.3; _cpUp = 0.01; }; case 8: { _time = 0.2; _cpUp = 0.01; }; case 9: { _time = 0.2; _cpUp = 0.02; }; case 10: { _time = 0.2; _cpUp = 0.03; }; }; }; while{true} do{sleep _time; _cP = _cP + _cpUp; _progress progressSetPosition _cP; _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp]; if(_cP >= 1) exitWith {}; if(player distance _vendor > 10) exitWith {}; }; if(player distance _vendor > 10) exitWith {hint localize "STR_Process_Stay"; 5 cutText ["","PLAIN"]; life_is_processing = false; }; if(life_cash < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; }; if(!([false,_oldItem,_oldVal] call life_fnc_handleInv)) exitWith {5 cutText ["","PLAIN"]; life_is_processing = false; }; if(!([true,_newItem,_oldVal] call life_fnc_handleInv)) exitWith {5 cutText ["","PLAIN"]; [true,_oldItem,_oldVal] call life_fnc_handleInv; life_is_processing = false; }; 5 cutText ["","PLAIN"]; titleText[format[localize "STR_Process_Processed2",_oldVal,_itemName,[_cost] call life_fnc_numberText],"PLAIN"]; life_cash = life_cash - _cost; if( _profName != "" ) then {[_profName,40] call life_fnc_addExp; }; life_is_processing = false; };
8.Unter ”life_action_inuse = true“ müsst er alles ersetzten (Fn_pickaxeUse.sqf)
Code
Alles anzeigenlife_action_inUse = true; _time = 0; _profName = [_gather] call life_fnc_profType; if( _profName != "" ) then {_data = missionNamespace getVariable (_profName); _time = ( 3 - (0.25 * (_data select 0))); }; for "_i" from 0 to 2 do{player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; }; sleep _time; }; if(([true,_mine,_diff] call life_fnc_handleInv)) then{_itemName = [([_mine,0] call life_fnc_varHandle)] call life_fnc_varToStr; titleText[format[localize "STR_ISTR_Pick_Success",_itemName,_diff],"PLAIN"]; if( _profName != "" ) then {[_profName,25] call life_fnc_addExp; }; }; life_action_inUse = false;
9.Unter ”life_action_inuse = true“ müsst er alles ersetzten (fn_gather.sqf)Code
Alles anzeigenlife_action_inUse = true; _time = 0; _profName = [_gather] call life_fnc_profType; if( _profName != "" ) then {_data = missionNamespace getVariable (_profName); _time = ( 3 - (0.25 * (_data select 0))); }; for "_i" from 0 to 2 do{player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; }; sleep _time; }; if(([true,_gather,_diff] call life_fnc_handleInv)) then{_itemName = [([_gather,0] call life_fnc_varHandle)] call life_fnc_varToStr; titleText[format[localize "STR_NOTF_Gather_Success",_itemName,_diff],"PLAIN"]; if( _profName != "" ) then {[_profName,25] call life_fnc_addExp; }; }; life_action_inUse = false;
10. Unter ”life_gear = _this select 8 down;“ müsst er alles ersetzten (fn_requestRecieved.sqf)
Code
Alles anzeigenlife_gear = _this select 8; [] call life_fnc_loadGear; if(count (_this select 9) > 0) then {{missionNamespace setVariable [(_x select 0),[parseNumber (_x select 1), parseNumber (_x select 2)]]; } foreach (_this select 9); }; //Parse side specific information. switch(playerSide) do {case west: {__CONST__(life_coplevel, parseNumber(_this select 7)); __CONST__(life_medicLevel,0); life_blacklisted = _this select 10; }; case civilian: {life_is_arrested = _this select 7; __CONST__(life_coplevel, 0); __CONST__(life_medicLevel, 0); life_houses = _this select 10; {_house = nearestBuilding (call compile format["%1", _x select 0]); life_vehicles pushBack _house; } foreach life_houses; life_gangData = _This select 11; if(count life_gangData != 0) then {[] spawn life_fnc_initGang; }; [] spawn life_fnc_initHouses; }; case independent: {__CONST__(life_medicLevel, parseNumber(_this select 7)); __CONST__(life_coplevel,0); }; }; if(count (_this select 13) > 0) then {{life_vehicles pushBack _x; } foreach (_this select 12); }; life_session_completed = true;
11. In der configuration.sqf sucht nach://Setup License Variables{missionNamespace setVariable[(_x select 0),false];} foreach life_licenses; und scheibt folgendes darunter:
Code
Alles anzeigenlife_prof =[["Oil_Prof","civ"],["Iron_Prof","civ"],["Copper_Prof","civ"],["Heroin_Prof","civ"],["Canabis_Prof","civ"],["Cocain_Prof","civ"],["Salt_Prof","civ"],["Fruit_Prof","civ"],["Diamond_Prof","civ"],["Rock_Prof","civ"],["Sand_Prof","civ"]]; //Setup License Variables {missionNamespace setVariable[(_x select 0),[1,0]];} foreach life_prof;
12. Ladet euch diesen Ordner herunter:Level System (3).zip und fügt die Dateien ein.
Live_Server
13. Ersetzt in der fn_Updaterequest.sqf alles durch das:Code
Alles anzeigen/*File: fn_updateRequest.sqfAuthor: Bryan "Tonic" Boardwine Description:Ain't got time to describe it, READ THE FILE NAME!*/ private["_uid","_side","_cash","_bank","_licenses","_gear","_name","_query","_thread"]; _uid = [_this,0,"",[""]] call BIS_fnc_param; _name = [_this,1,"",[""]] call BIS_fnc_param; _side = [_this,2,sideUnknown,[civilian]] call BIS_fnc_param; _cash = [_this,3,0,[0]] call BIS_fnc_param; _bank = [_this,4,5000,[0]] call BIS_fnc_param; _licenses = [_this,5,[],[[]]] call BIS_fnc_param; _gear = [_this,6,[],[[]]] call BIS_fnc_param; _prof = [_this, 7,[],[[]]] call BIS_fnc_param; //Get to those error checks. if((_uid == "") OR (_name == "")) exitWith {}; //Parse and setup some data. _name = [_name] call DB_fnc_mresString; _gear = [_gear] call DB_fnc_mresArray; _cash = [_cash] call DB_fnc_numberSafe; _bank = [_bank] call DB_fnc_numberSafe; //Does something license related but I can't remember I only know it's important? for "_i" from 0 to count(_licenses)-1 do {_bool = [(_licenses select _i) select 1] call DB_fnc_bool; _licenses set[_i,[(_licenses select _i) select 0,_bool]]; }; _licenses = [_licenses] call DB_fnc_mresArray; _prof = [_prof] call DB_fnc_mresArray; switch (_side) do {case west: {_query = format["UPDATE players SET name='%1', cash='%2', bankacc='%3', cop_gear='%4', cop_licenses='%5', cop_prof='%7' WHERE playerid='%6'",_name,_cash,_bank,_gear,_licenses,_uid,_prof]; }; case civilian: {_query = format["UPDATE players SET name='%1', cash='%2', bankacc='%3', civ_licenses='%4', civ_gear='%6', arrested='%7', civ_prof='%8' WHERE playerid='%5'",_name,_cash,_bank,_licenses,_uid,_gear,[_this select 8] call DB_fnc_bool,_prof]; }; case independent: {_query = format["UPDATE players SET name='%1', cash='%2', bankacc='%3', med_licenses='%4', med_gear='%6',med_prof='%7' WHERE playerid='%5'",_name,_cash,_bank,_licenses,_uid,_gear,_prof]; }; }; waitUntil {sleep (random 0.3); !DB_Async_Active}; _queryResult = [_query,1] call DB_fnc_asyncCall;
-
ne ich habe die Dateien nur entwirrt das es nicht so aussieht:
Code//Prof Blockcase "Oil_Prof": {(localize "STR_Prof_Oil")};case "Iron_Prof": {(localize "STR_Prof_Iron")};case "Copper_Prof": {(localize "STR_Prof_Copper")};case "Rock_Prof": {(localize "STR_Prof_Rock")};case "Fruit_Prof": {(localize "STR_Prof_Fruit")};case "Salt_Prof": {(localize "STR_Prof_Salt")};case "Sand_Prof": {(localize "STR_Prof_Sand")};case "Diamond_Prof": {(localize "STR_Prof_Diamond")};case "Cocain_Prof": {(localize "STR_Prof_Cocain")};case "Canabis_Prof": {(localize "STR_Prof_Canabis")};case "Heroin_Prof": {(localize "STR_Prof_Heroin")};
-
fn_actionsKeyHandler (Zeile 94 ff)
Codeif (isPlayer _curObject && _curObject isKindOf "Man") then { if ((_curObject getVariable ["restrained",false]) && !dialog && playerSide isEqualTo west) then { [_curObject] call life_fnc_copInteractionMenu; }; } else {...};
wird zu
Cif (isPlayer _curTarget && _curObject isKindOf "Man") then { if (!dialog && playerSide isEqualTo west) then { [_curObject] call life_fnc_copInteractionMenu; }; } else {...};
und fn_copInteractionMenu.sqd (am Ende der Datei einfügen)Geht das auch für die 4.4 alt ?
-
Ich habe mal die Dateien angepasst
-
_abortButton buttonSetAction "[] call SOCK_fnc_updateRequest; [player] remoteExec [""TON_fnc_cleanupRequest"",2];";
_abortButton ctrlSetEventHandler ["ButtonClick","[] spawn life_fnc_loggedOut; (findDisplay 49) closeDisplay 2; true"];Ersetzte diese Zeilen gegen die:
-
1. Öffnet die fn_escInterupt.sqf und sucht nach:
_abortButton buttonSetAction "[] call SOCK_fnc_updateRequest; [player] remoteExec [""TON_fnc_cleanupRequest"",2];";
direkt darunter schreibt hier das rein:_abortButton ctrlSetEventHandler ["ButtonClick","[] spawn life_fnc_loggedOut; (findDisplay 49) closeDisplay 2; true"];
@Sam Law wiederhole diesen Schritt nochmal.
Mfg
AmaZiinG
-
-
-
Geh in die Config_Vehicles.hpp und unter class LifeCfgVehicles { musst du, dann dein classname vom Mod-Fahrzeug angeben. Hier ein Beispiel:
Codeclass bv_caressa_cop_patrol { vItemSpace = 150; storageFee[] = { 0, 0, 1500, 0 }; garageSell[] = { 0, 0, 5000, 0 }; insurance = 2500; chopShop = 12500; textures[] = {}; };
Wenn du das gemacht scrollst du wieder hoch und fügst das Auto in den entsprechenden Shop ein.
Hier ein Beispiel: -
-
Code
Alles anzeigen/* File: fn_seizePlayerWeapon.sqf Author: Skalicon Description: Preforms the seizePlayerWeaponAction script on the cursorTarget updated by: Dexter */ [[],"life_fnc_seizePlayerWeaponAction",cursorTarget,false] spawn life_fnc_MP; titleText format["Took weapons from: %1",name player,_message]; [0,"STR_Cop_WeaponSeized",true,[_unit GVAR["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",west];
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_playerTags.sqf Author: Bryan "Tonic" Boardwine Description: Adds the tags above other players heads when close and have visible range. */ private["_ui","_units","_masks"]; #define iconID 78000 #define scale 0.8 _headgear = ["H_Shemag_olive","H_Shemag_khk","H_ShemagOpen_tan","H_ShemagOpen_khk","H_Shemag_olive_hs"]; _goggles = ["G_Balaclava_blk"]; if(visibleMap OR {!alive player} OR {dialog}) exitWith { 500 cutText["","PLAIN"]; }; //_ui = GVAR_UINS ["Life_HUD_nameTags",displayNull]; //if(isNull _ui) then { 500 cutRsc["Life_HUD_nameTags","PLAIN"]; _ui = GVAR_UINS ["Life_HUD_nameTags",displayNull]; }; _units = nearestObjects[(visiblePosition player),["Man","Land_Pallet_MilBoxes_F","Land_Sink_F"],50]; SUB(_units,[player]); _masks = LIFE_SETTINGS(getArray,"clothing_masks"); { private "_text"; _idc = _ui displayCtrl (iconID + _forEachIndex); if(!(lineIntersects [eyePos player, eyePos _x, player, _x]) && alive _x && {!isNil {_x GVAR "realname"}}) then { _pos = switch(typeOf _x) do { case "Land_Pallet_MilBoxes_F": {[visiblePosition _x select 0, visiblePosition _x select 1, (getPosATL _x select 2) + 1.5]}; case "Land_Sink_F": {[visiblePosition _x select 0, visiblePosition _x select 1, (getPosATL _x select 2) + 2]}; default {[visiblePosition _x select 0, visiblePosition _x select 1, ((_x modelToWorld (_x selectionPosition "head")) select 2)+.5]}; }; _sPos = worldToScreen _pos; _distance = _pos distance player; if(!((headgear _x) in _masks OR (goggles _x) in _masks OR (uniform _x) in _masks)) then { if(count _sPos > 1 && {_distance < 15}) then { _text = switch (true) do { case ((headgear _x) in _headgear): {format["<t color='#000000'>Unbekannt</t>"];}; case ((goggles _x) in _goggles): {format["<t color='#000000'>Unbekannt</t>"];}; case (_x in (units grpPlayer) && playerSide == civilian): {format["<t color='#00FF00'>%1</t>",(_x GVAR ["realname",name _x])];}; case (side _x == west && {!isNil {_x GVAR "rank"}}): {format["<img image='%1' size='1'></img> %2",switch ((_x GVAR "rank")) do { case 2: {"\a3\ui_f\data\gui\cfg\Ranks\corporal_gs.paa"}; case 3: {"\a3\ui_f\data\gui\cfg\Ranks\sergeant_gs.paa"}; case 4: {"\a3\ui_f\data\gui\cfg\Ranks\lieutenant_gs.paa"}; case 5: {"\a3\ui_f\data\gui\cfg\Ranks\captain_gs.paa"}; case 6: {"\a3\ui_f\data\gui\cfg\Ranks\major_gs.paa"}; case 7: {"\a3\ui_f\data\gui\cfg\Ranks\colonel_gs.paa"}; case 8: {"\a3\ui_f\data\gui\cfg\Ranks\general_gs.paa"}; default {"\a3\ui_f\data\gui\cfg\Ranks\private_gs.paa"}; },_x GVAR ["realname",name _x]]}; case (side _x == independent): {format["<t color='#FF0000'><img image='a3\ui_f\data\map\MapControl\hospital_ca.paa' size='1.5'></img></t> %1",_x GVAR ["realname",name _x]]}; default { if(!isNil {(group _x) GVAR "gang_name"}) then { format["%1<br/><t size='0.8' color='#B6B6B6'>%2</t>",_x GVAR ["realname",name _x],(group _x) GVAR ["gang_name",""]]; } else { _x GVAR ["realname",name _x]; }; }; }; _idc ctrlSetStructuredText parseText _text; _idc ctrlSetPosition [_sPos select 0, _sPos select 1, 0.4, 0.65]; _idc ctrlSetScale scale; _idc ctrlSetFade 0; _idc ctrlCommit 0; _idc ctrlShow true; } else { _idc ctrlShow false; }; } else { _idc ctrlShow false; }; } else { _idc ctrlShow false; }; } foreach _units;
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_onPlayerRespawn.sqf Author: Bryan "Tonic" Boardwine Description: Does something but I won't know till I write it... */ private["_unit","_corpse","_containers"]; _unit = SEL(_this,0); _corpse = SEL(_this,1); life_corpse = _corpse; //Comment this code out if you want them to keep the weapon on the ground. _containers = nearestObjects[getPosATL _corpse,["WeaponHolderSimulated"],5]; //Fetch list of containers (Simulated = weapons) {deleteVehicle _x;} foreach _containers; //Delete the containers. //Set some vars on our new body. _unit SVAR ["restrained",false,true]; _unit SVAR ["Escorting",false,true]; _unit SVAR ["transporting",false,true]; //Again why the am I setting this? Can anyone tell me? _unit SVAR ["playerSurrender",false,true]; _unit SVAR ["steam64id",steamid,true]; //Reset the UID. _unit SVAR ["realname",profileName,true]; //Reset the players name. player setVariable ['copLevel',1] _unit addRating 1e12; //Set our rating to a high value, this is for a ARMA engine thing. player playMoveNow "amovppnemstpsraswrfldnon"; [] call life_fnc_setupActions; [_unit,life_sidechat,playerSide] remoteExecCall ["TON_fnc_managesc",RSERV]; if(EQUAL(LIFE_SETTINGS(getNumber,"enable_fatigue"),0)) then {player enableFatigue false;};