ja sry aber dan gib doch mal logs .....
Beiträge von br1zey
-
-
was genau geht den jetzt nicht neuen RPT und [lexicon]extDB[/lexicon] log wäre da schon hilfreich
-
nein du must jedes auto zum kaufen machen jeden classname xD oder du machst die farben mit code

-
@STG_SilentF0x ich sehe da nur ein fehler
ErrorMessage: File mpmissions\Altis_Life.Altis\description.ext, line 192: /Life_impounded_menu/: Missing '}'
Schicke bitte noch mal deine [lexicon]extDB[/lexicon] log
-
das Problem bei mod Autos ist meistens das du für jede Farbe eine anderer Classname ist ansonsten kannst du die auch über Farbcods machen
-
zum rauskaufen wenn es kaput ist auf dei schnelle könntest du die Procedur in der DB umschreiben das die die fahrzeugen nicht löscht sondern auf impound setzt
-
mhh komisch bei mir is der da Habes es noch mal Bearbeitet
-
Weiter gehts in der Mission
Zuerst unsere .hpp
impounded.hpp erstellenSpoiler anzeigen
C
Alles anzeigenclass Life_impounded_menu { idd = 28000; name="life_impounded_menu"; movingEnabled = 0; enableSimulation = 1; onLoad = "ctrlShow [23300,false];"; class controlsBackground { class Life_RscTitleBackground : Life_RscText { 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])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; idc = -1; x = 0.1; y = 0.2; w = 0.8; h = (1 / 25); }; class MainBackground : Life_RscText { colorBackground[] = {0,0,0,0.7}; idc = -1; x = 0.1; y = 0.2 + (11 / 250); w = 0.8; h = 0.7 - (22 / 250); }; class Title : Life_RscTitle { idc = 28010; text = "$STR_GUI_ImpGarage"; x = 0.1; y = 0.2; w = 0.8; h = (1 / 25); }; class VehicleTitleBox : Life_RscText { idc = -1; text = "$STR_GUI_YourImpVeh"; 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])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; x = 0.11; y = 0.26; w = 0.3; h = (1 / 25); }; class VehicleInfoHeader : Life_RscText { idc = 28300; text = "$STR_GUI_VehInfo"; 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])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; x = 0.42; y = 0.26; w = 0.46; h = (1 / 25); }; class CloseBtn : Life_RscButtonMenu { idc = -1; text = "$STR_Global_Close"; onButtonClick = "closeDialog 0;"; x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.9 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class RentCar : Life_RscButtonMenu { idc = -1; text = "$STR_Global_Retrieve"; onButtonClick = "[] call life_fnc_willswieder; closeDialog 0;"; x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.9 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; }; class controls { class VehicleList : Life_RscListBox { idc = 28020; text = ""; sizeEx = 0.04; colorBackground[] = {0.1,0.1,0.1,0.9}; onLBSelChanged = "_this call life_fnc_impoundLBChange;"; //Position & height x = 0.11; y = 0.302; w = 0.303; h = 0.49; }; class vehicleInfomationList : Life_RscStructuredText { idc = 28030; text = ""; sizeEx = 0.035; x = 0.41; y = 0.3; w = 0.5; h = 0.5; }; class MainBackgroundHider : Life_RscText { colorBackground[] = {0,0,0,1}; idc = 28100; x = 0.1; y = 0.2 + (11 / 250); w = 0.8; h = 0.7 - (22 / 250); }; class MainHideText : Life_RscText { idc = 28110; text = "$STR_ANOTF_QueryImpGarage"; sizeEx = 0.06; x = 0.24; y = 0.5; w = 0.6; h = (1 / 15); }; }; };
und in die Masterhandler.hpp Eintragen NICHT VERGESSEN
Neue Datei in \core\shops\ Namens "fn_impoundedmenu.sqf"Spoiler anzeigen
C
Alles anzeigen/* File: fn_impoundedmenu.sqf Author: Bryan "Tonic" Boardwine Description: Lists impounded vehicles. DUE TO BE REWROTE IN NEW SYSTEM */ private ["_display","_cars","_name","_pic","_color","_text","_price"]; if (!dialog) then { if (!(createDialog "Life_impound_menu")) exitWith {}; life_impound_yard = _this select 3; }; disableSerialization; _display = findDisplay 28000; if (isNull _display) exitWith {}; _cars = _display displayCtrl 28010; lbClear _cars; for "_i" from 0 to (count life_vehicles)-1 do { _veh = life_vehicles select _i; if (_veh distance impound_obj < 50) then { _price = [_veh] call life_fnc_impoundPrice; switch (true) do { case (_veh isKindOf "Car") : {_price = _price + 100;}; case (_veh isKindOf "Air") : {_price = _price + 650;}; case (_veh isKindOf "Ship") : {_price = _price + 50;}; }; if (_price > CASH) then { _price = _price + 200; }; _color = [(typeOf _veh),(_veh getVariable "Life_VEH_color")] call life_fnc_vehicleColorStr; _text = format ["(%1)",_color]; if (_text == "()") then { _text = ""; }; _name = getText(configFile >> "CfgVehicles" >> (typeOf _veh) >> "displayName"); _pic = getText(configFile >> "CfgVehicles" >> (typeOf _veh) >> "picture"); _cars lbAdd format ["%1 %2 - Cost: $%3",_name,_text,[_price] call life_fnc_numberText]; _cars lbSetPicture [(lbSize _cars)-1,_pic]; _cars lbSetData [(lbSize _cars)-1,str(_i)]; _cars lbSetValue [(lbSize _cars)-1,_price]; }; };
fn_impoundAction.sqfSpoiler anzeigen
C
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_impoundAction.sqf Author: Bryan "Tonic" Boardwine Description: Impounds the vehicle */ private ["_vehicle","_type","_time","_value","_vehicleData","_upp","_ui","_progress","_pgText","_cP","_filters","_impoundValue","_price","_impoundMultiplier"]; _vehicle = param [0,objNull,[objNull]]; _filters = ["Car","Air","Ship"]; if (!((KINDOF_ARRAY(_vehicle,_filters)))) exitWith {}; if (player distance cursorObject > 10) exitWith {}; if (_vehicle getVariable "NPC") exitWith {hint localize "STR_NPC_Protected"}; _vehicleData = _vehicle getVariable ["vehicle_info_owners",[]]; if (_vehicleData isEqualTo 0) exitWith {deleteVehicle _vehicle}; //Bad vehicle. _vehicleName = FETCH_CONFIG2(getText,"CfgVehicles",(typeOf _vehicle),"displayName"); _price = M_CONFIG(getNumber,"LifeCfgVehicles",(typeOf _vehicle),"price"); [0,"STR_NOTF_BeingImpounded",true,[((_vehicleData select 0) select 1),_vehicleName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; life_action_inUse = true; _upp = localize "STR_NOTF_Impounding"; //Setup our progress bar. disableSerialization; "progressBar" cutRsc ["life_progress","PLAIN"]; _ui = uiNamespace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format ["%2 (1%1)...","%",_upp]; _progress progressSetPosition 0.01; _cP = 0.01; for "_i" from 0 to 1 step 0 do { sleep 0.09; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_upp]; if (_cP >= 1) exitWith {}; if (player distance _vehicle > 10) exitWith {}; if (!alive player) exitWith {}; }; "progressBar" cutText ["","PLAIN"]; if (player distance _vehicle > 10) exitWith {hint localize "STR_NOTF_ImpoundingCancelled"; life_action_inUse = false;}; if (!alive player) exitWith {life_action_inUse = false;}; if (count crew _vehicle isEqualTo 0) then { if (!(KINDOF_ARRAY(_vehicle,_filters))) exitWith {life_action_inUse = false;}; _type = FETCH_CONFIG2(getText,"CfgVehicles",(typeOf _vehicle),"displayName"); life_impound_inuse = true; if (life_HC_isActive) then { [_vehicle,true,player] remoteExec ["HC_fnc_vehicleStore",HC_Life]; } else { [_vehicle,true,player] remoteExec ["TON_fnc_vehicleImpound",RSERV]; }; waitUntil {!life_impound_inuse}; if (playerSide isEqualTo west) then { _impoundMultiplier = LIFE_SETTINGS(getNumber,"vehicle_cop_impound_multiplier"); _value = _price * _impoundMultiplier; [0,"STR_NOTF_HasImpounded",true,[profileName,((_vehicleData select 0) select 1),_vehicleName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; if (_vehicle in life_vehicles) then { hint format [localize "STR_NOTF_OwnImpounded",[_value] call life_fnc_numberText,_type]; BANK = BANK - _value; } else { hint format [localize "STR_NOTF_Impounded",_type,[_value] call life_fnc_numberText]; BANK = BANK + _value; }; if (BANK < 0) then {BANK = 0;}; [1] call SOCK_fnc_updatePartial; }; } else { hint localize "STR_NOTF_ImpoundingCancelled"; }; life_action_inUse = false;
Neue Datei in \dialog\function Namens "fn_impoundedMenu.sqf"Spoiler anzeigen
C
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_impoundedMenu.sqf Author: Bryan "Tonic" Boardwine Description: Not actually a impound menu, may act as confusion to some but that is what I wanted. The purpose of this menu is it is now called a 'Garage' where vehicles are stored (persistent ones). */ private ["_vehicles","_control"]; disableSerialization; _vehicles = param [0,[],[[]]]; ctrlShow[28030,false]; ctrlShow[28300,false]; waitUntil {!isNull (findDisplay 28000)}; if (count _vehicles isEqualTo 0) exitWith { ctrlSetText[28110,localize "STR_Garage_NoVehicles"]; }; _control = CONTROL(28000,28020); lbClear _control; { _vehicleInfo = [(_x select 2)] call life_fnc_fetchVehInfo; _control lbAdd (_vehicleInfo select 3); _tmp = [(_x select 2),(_x select 8)]; _tmp = str(_tmp); _control lbSetData [(lbSize _control)-1,_tmp]; _control lbSetPicture [(lbSize _control)-1,(_vehicleInfo select 2)]; _control lbSetValue [(lbSize _control)-1,(_x select 0)]; } forEach _vehicles; ctrlShow[28100,false]; ctrlShow[28110,false];
Neue Datei in \dialog\function\ Namens "fn_impoundLBChange.sqf"Spoiler anzeigen
C
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_garageLBChange.sqf Author: Bryan "Tonic" Boardwine Description: Can't be bothered to answer it.. Already deleted it by accident.. */ disableSerialization; private ["_control","_index","_className","_classNameLife","_dataArr","_vehicleColor","_vehicleInfo","_trunkSpace","_sellPrice","_retrievePrice","_sellMultiplier","_price","_storageFee","_purchasePrice"]; _control = _this select 0; _index = _this select 1; //Fetch some information. _dataArr = CONTROL_DATAI(_control,_index); _dataArr = call compile format ["%1",_dataArr]; _className = (_dataArr select 0); _classNameLife = _className; if (!isClass (missionConfigFile >> "LifeCfgVehicles" >> _classNameLife)) then { _classNameLife = "Default"; //Use Default class if it doesn't exist diag_log format ["%1: LifeCfgVehicles class doesn't exist",_className]; }; _vehicleColor = ((M_CONFIG(getArray,"LifeCfgVehicles",_classNameLife,"textures") select (_dataArr select 1)) select 0); if (isNil "_vehicleColor") then {_vehicleColor = "Default";}; _vehicleInfo = [_className] call life_fnc_fetchVehInfo; _trunkSpace = [_className] call life_fnc_vehicleWeightCfg; _price = M_CONFIG(getNumber,"LifeCfgVehicles",_classNameLife,"price"); _storageFee = LIFE_SETTINGS(getNumber,"vehicle_impound_fee_multiplier"); _retrievePrice = _price * _storageFee; if (!(_sellPrice isEqualType 0) || _sellPrice < 1) then {_sellPrice = 500;}; if (!(_retrievePrice isEqualType 0) || _retrievePrice < 1) then {_retrievePrice = 500;}; (CONTROL(28000,28030)) ctrlSetStructuredText parseText format [ (localize "STR_Shop_IMPVEH")+ " <t color='#8cff9b'>$%1</t><br/>", [_retrievePrice] call life_fnc_numberText ]; ctrlShow [28030,true]; ctrlShow [28300,true];
Neue Datei in \dialog\function\ Namens "fn_willswieder.sqf"Spoiler anzeigen
C
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_willswieder.sqf Author: Bryan "Tonic" Boardwine Description: Yeah... Gets the vehicle from the garage. */ private ["_vehicle","_vehicleLife","_vid","_pid","_unit","_price","_price","_storageFee","_purchasePrice"]; disableSerialization; if ((lbCurSel 28020) isEqualTo -1) exitWith {hint localize "STR_Global_NoSelection"}; _vehicle = lbData[28020,(lbCurSel 28020)]; _vehicle = (call compile format ["%1",_vehicle]) select 0; _vehicleLife = _vehicle; _vid = lbValue[28020,(lbCurSel 28020)]; _pid = getPlayerUID player; _unit = player; _spawntext = localize "STR_Garage_spawn_Success"; if (isNil "_vehicle") exitWith {hint localize "STR_Garage_Selection_Error"}; if (!isClass (missionConfigFile >> "LifeCfgVehicles" >> _vehicleLife)) then { _vehicleLife = "Default"; //Use Default class if it doesn't exist diag_log format ["%1: LifeCfgVehicles class doesn't exist",_vehicle]; }; _price = M_CONFIG(getNumber,"LifeCfgVehicles",_vehicleLife,"price"); _storageFee = LIFE_SETTINGS(getNumber,"vehicle_impound_fee_multiplier"); _price = _price * _storageFee; if (!(_price isEqualType 0) || _price < 1) then {_price = 500;}; if (BANK < _price) exitWith {hint format [(localize "STR_Garage_CashError"),[_price] call life_fnc_numberText];}; if (life_garage_sp isEqualType []) then { if (life_HC_isActive) then { [_vid,_pid,(life_garage_sp select 0),_unit,_price,(life_garage_sp select 1),_spawntext] remoteExec ["HC_fnc_spawnVehicle",HC_Life]; } else { [_vid,_pid,(life_garage_sp select 0),_unit,_price,(life_garage_sp select 1),_spawntext] remoteExec ["TON_fnc_spawnVehicle",RSERV]; }; } else { if (life_garage_sp in ["medic_spawn_1","medic_spawn_2","medic_spawn_3"]) then { if (life_HC_isActive) then { [_vid,_pid,life_garage_sp,_unit,_price,0,_spawntext] remoteExec ["HC_fnc_spawnVehicle",HC_Life]; } else { [_vid,_pid,life_garage_sp,_unit,_price,0,_spawntext] remoteExec ["TON_fnc_spawnVehicle",RSERV]; }; } else { if (life_HC_isActive) then { [_vid,_pid,(getMarkerPos life_garage_sp),_unit,_price,markerDir life_garage_sp,_spawntext] remoteExec ["HC_fnc_spawnVehicle",HC_Life]; } else { [_vid,_pid,(getMarkerPos life_garage_sp),_unit,_price,markerDir life_garage_sp,_spawntext] remoteExec ["TON_fnc_spawnVehicle",RSERV]; }; }; }; hint localize "STR_Garage_SpawningVeh"; BANK = BANK - _price; [1] call SOCK_fnc_updatePartial; closeDialog 0;
Jetzt in der Config_Master.hpp das eintragenSpoiler anzeigen
Nun noch in Functions.hpp alles eintragen:Spoiler anzeigen
stringtable.xmlSpoiler anzeigen
C
Alles anzeigen<Key ID="STR_Garage_NoImpVehicles"> <Original>Keine beschlagnahmten Fahrzeuge gefunden.</Original> </Key> <Key ID="STR_GUI_ImpGarage"> <Original>Verwahrungsstelle</Original> </Key> <Key ID="STR_GUI_YourImpVeh"> <Original>Beschlagnahmte Fahrzeuge</Original> </Key> <Key ID="STR_GUI_VehInfo"> <Original>Und nun?!</Original> </Key> <Key ID="STR_Shop_IMPVEH"> <Original>Um dein Beschlagnahmtes Fahrzeug wieder zu bekommen verlangen wir eine Gebühr von</Original> </Key> <Key ID="STR_ANOTF_QueryImpGarage"> <Original>Durchsuche nach Fahrzeugen...</Original> </Key>
Jetzt Noch den NPC erstellen und eine Spawnpunkt angeben dan sind wir auch gleich Fertig
Bitte DurchlesenSpoiler anzeigen
Cthis addAction["Verwahrungsstelle KFZ", { [getPlayerUID player,playerSide,"Car",player] remoteExecCall ["TON_fnc_getimpoundedVehicles",2]; createDialog "Life_impounded_menu"; disableSerialization; ctrlSetText[28020,"Suche verwarte Fahrzeuge"]; life_garage_sp = "EUER SPAWN PUNKT"; life_garage_type = "Car"; }];Noch in der CfgRemoteExec.hpp eintragen
jetzt Noch die Datenbank machen SQL im Dateianhang
impound.sql
Das wars auch schon
Ich hoffe Ich konnte euch Helfen -
Da ja einige das gewünscht hatten jetzt das Tutorial der Verwarstelle für AltisLife v4.4.R4+
Ich habe das die Datein auf den Stand des Git Repos gebracht
Update vom Stand 20.10
Also Fangen wir an
In der Life Server zu Ändern sind :
fn_getVehicles.sqfSpoiler anzeigen
C
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_getVehicles.sqf Author: Bryan "Tonic" Boardwine Description: Sends a request to query the database information and returns vehicles. */ private ["_pid","_side","_type","_unit","_ret","_tickTime","_queryResult"]; _pid = [_this,0,"",[""]] call BIS_fnc_param; _side = [_this,1,sideUnknown,[west]] call BIS_fnc_param; _type = [_this,2,"",[""]] call BIS_fnc_param; _unit = [_this,3,objNull,[objNull]] call BIS_fnc_param; //Error checks if (_pid isEqualTo "" || _side isEqualTo sideUnknown || _type isEqualTo "" || isNull _unit) exitWith { if (!isNull _unit) then { [[]] remoteExec ["life_fnc_impoundMenu",(owner _unit)]; }; }; _unit = owner _unit; _side = switch (_side) do { case west:{"cop"}; case civilian: {"civ"}; case independent: {"med"}; default {"Error"}; }; if (_side == "Error") exitWith { [[]] remoteExec ["life_fnc_impoundMenu",(owner _unit)]; }; _query = format ["SELECT id, side, classname, type, pid, alive, active, plate, color FROM vehicles WHERE pid='%1' AND alive='1' AND active='0' AND impound='0' AND side='%2' AND type='%3'",_pid,_side,_type]; _tickTime = diag_tickTime; _queryResult = [_query,2,true] 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 { [[]] remoteExec ["life_fnc_impoundMenu",(owner _unit)]; }; [_queryResult] remoteExec ["life_fnc_impoundMenu",_unit];
Neue Datei in \functions\System\fn_getImpoundedvehicles.sqfSpoiler anzeigen
C
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_getImpoundedvehicles.sqf Author: Bryan "Tonic" Boardwine Description: Sends a request to query the database information and returns vehicles. */ private ["_pid","_side","_type","_unit","_ret","_tickTime","_queryResult"]; _pid = [_this,0,"",[""]] call BIS_fnc_param; _side = [_this,1,sideUnknown,[west]] call BIS_fnc_param; _type = [_this,2,"",[""]] call BIS_fnc_param; _unit = [_this,3,objNull,[objNull]] call BIS_fnc_param; //Error checks if (_pid isEqualTo "" || _side isEqualTo sideUnknown || _type isEqualTo "" || isNull _unit) exitWith { if (!isNull _unit) then { [[]] remoteExec ["life_fnc_impoundedMenu",(owner _unit)]; }; }; _unit = owner _unit; _side = switch (_side) do { case west:{"cop"}; case civilian: {"civ"}; case independent: {"med"}; default {"Error"}; }; if (_side == "Error") exitWith { [[]] remoteExec ["life_fnc_impoundedMenu",(owner _unit)]; }; _query = format ["SELECT id, side, classname, type, pid, alive, active, plate, color FROM vehicles WHERE pid='%1' AND alive='1' AND active='0' AND impound='1' AND side='%2' AND type='%3'",_pid,_side,_type]; _tickTime = diag_tickTime; _queryResult = [_query,2,true] 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 { [[]] remoteExec ["life_fnc_impoundedMenu",(owner _unit)]; }; [_queryResult] remoteExec ["life_fnc_impoundedMenu",_unit];
fn_spawnvehicle.sqfSpoiler anzeigen
C
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_spawnVehicle.sqf Author: Bryan "Tonic" Boardwine Description: Sends the query request to the database, if an array is returned then it creates the vehicle if it's not in use or dead. */ private ["_vid","_sp","_pid","_query","_sql","_vehicle","_nearVehicles","_name","_side","_tickTime","_dir","_servIndex","_damage","_wasIllegal","_location","_thread"]; _vid = [_this,0,-1,[0]] call BIS_fnc_param; _pid = [_this,1,"",[""]] call BIS_fnc_param; _sp = [_this,2,[],[[],""]] call BIS_fnc_param; _unit = [_this,3,objNull,[objNull]] call BIS_fnc_param; _price = [_this,4,0,[0]] call BIS_fnc_param; _dir = [_this,5,0,[0]] call BIS_fnc_param; _spawntext = _this select 6; _unit_return = _unit; _name = name _unit; _side = side _unit; _unit = owner _unit; if (_vid isEqualTo -1 || _pid isEqualTo "") exitWith {}; if (_vid in serv_sv_use) exitWith {}; serv_sv_use pushBack _vid; _servIndex = serv_sv_use find _vid; _query = format ["SELECT id, side, classname, type, pid, alive, active, plate, color, inventory, gear, fuel, damage, blacklist, impound FROM vehicles WHERE id='%1' AND pid='%2'",_vid,_pid]; _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 {}; _vInfo = _queryResult; if (isNil "_vInfo") exitWith {serv_sv_use deleteAt _servIndex;}; if (count _vInfo isEqualTo 0) exitWith {serv_sv_use deleteAt _servIndex;}; if ((_vInfo select 5) isEqualTo 0) exitWith { serv_sv_use deleteAt _servIndex; [1,"STR_Garage_SQLError_Destroyed",true,[_vInfo select 2]] remoteExecCall ["life_fnc_broadcast",_unit]; }; if ((_vInfo select 6) isEqualTo 1) exitWith { serv_sv_use deleteAt _servIndex; [1,"STR_Garage_SQLError_Active",true,[_vInfo select 2]] remoteExecCall ["life_fnc_broadcast",_unit]; }; if (!(_sp isEqualType "")) then { _nearVehicles = nearestObjects[_sp,["Car","Air","Ship"],10]; } else { _nearVehicles = []; }; if (count _nearVehicles > 0) exitWith { serv_sv_use deleteAt _servIndex; [_price,_unit_return] remoteExecCall ["life_fnc_garageRefund",_unit]; [1,"STR_Garage_SpawnPointError",true] remoteExecCall ["life_fnc_broadcast",_unit]; }; _query = format ["UPDATE vehicles SET active='1', impound='0', damage='""[]""' WHERE pid='%1' AND id='%2'",_pid,_vid]; _trunk = [(_vInfo select 9)] call DB_fnc_mresToArray; _gear = [(_vInfo select 10)] call DB_fnc_mresToArray; _damage = [(_vInfo select 12)] call DB_fnc_mresToArray; _wasIllegal = (_vInfo select 13); _wasIllegal = if (_wasIllegal isEqualTo 1) then { true } else { false }; [_query,1] call DB_fnc_asyncCall; if (_sp isEqualType "") then { _vehicle = createVehicle[(_vInfo select 2),[0,0,999],[],0,"NONE"]; waitUntil {!isNil "_vehicle" && {!isNull _vehicle}}; _vehicle allowDamage false; _hs = nearestObjects[getMarkerPos _sp,["Land_Hospital_side2_F"],50] select 0; _vehicle setPosATL (_hs modelToWorld [-0.4,-4,12.65]); uiSleep 0.6; } else { _vehicle = createVehicle [(_vInfo select 2),_sp,[],0,"NONE"]; waitUntil {!isNil "_vehicle" && {!isNull _vehicle}}; _vehicle allowDamage false; _vehicle setPos _sp; _vehicle setVectorUp (surfaceNormal _sp); _vehicle setDir _dir; }; _vehicle allowDamage true; //Send keys over the network. [_vehicle] remoteExecCall ["life_fnc_addVehicle2Chain",_unit]; [_pid,_side,_vehicle,1] call TON_fnc_keyManagement; _vehicle lock 2; //Reskin the vehicle [_vehicle,(_vInfo select 8)] remoteExecCall ["life_fnc_colorVehicle",_unit]; _vehicle setVariable ["vehicle_info_owners",[[_pid,_name]],true]; _vehicle setVariable ["dbInfo",[(_vInfo select 4),(_vInfo select 7)],true]; _vehicle disableTIEquipment true; //No Thermals.. They're cheap but addictive. [_vehicle] call life_fnc_clearVehicleAmmo; // Avoid problems if u keep changing which stuff to save! if (LIFE_SETTINGS(getNumber,"save_vehicle_virtualItems") isEqualTo 1) then { _vehicle setVariable ["Trunk",_trunk,true]; if (_wasIllegal) then { if (_sp isEqualType "") then { _location= (nearestLocations [getPos _sp,["NameCityCapital","NameCity","NameVillage"],1000]) select 0; } else { _location= (nearestLocations [_sp,["NameCityCapital","NameCity","NameVillage"],1000]) select 0; }; _location = text _location; [1,"STR_NOTF_BlackListedVehicle",true,[_location,_name]] remoteExecCall ["life_fnc_broadcast",west]; _query = format ["UPDATE vehicles SET blacklist='0' WHERE id='%1' AND pid='%2'",_vid,_pid]; _thread = [_query,1] call DB_fnc_asyncCall; }; }else{ _vehicle setVariable ["Trunk",[[],0],true]; }; if (LIFE_SETTINGS(getNumber,"save_vehicle_fuel") isEqualTo 1) then { _vehicle setFuel (_vInfo select 11); }else{ _vehicle setFuel 1; }; if (count _gear > 0 && (LIFE_SETTINGS(getNumber,"save_vehicle_inventory") isEqualTo 1)) then { _items = _gear select 0; _mags = _gear select 1; _weapons = _gear select 2; _backpacks = _gear select 3; for "_i" from 0 to ((count (_items select 0)) - 1) do { _vehicle addItemCargoGlobal [((_items select 0) select _i), ((_items select 1) select _i)]; }; for "_i" from 0 to ((count (_mags select 0)) - 1) do { _vehicle addMagazineCargoGlobal [((_mags select 0) select _i), ((_mags select 1) select _i)]; }; for "_i" from 0 to ((count (_weapons select 0)) - 1) do { _vehicle addWeaponCargoGlobal [((_weapons select 0) select _i), ((_weapons select 1) select _i)]; }; for "_i" from 0 to ((count (_backpacks select 0)) - 1) do { _vehicle addBackpackCargoGlobal [((_backpacks select 0) select _i), ((_backpacks select 1) select _i)]; }; }; if (count _damage > 0 && (LIFE_SETTINGS(getNumber,"save_vehicle_damage") isEqualTo 1)) then { _parts = getAllHitPointsDamage _vehicle; for "_i" from 0 to ((count _damage) - 1) do { _vehicle setHitPointDamage [format ["%1",((_parts select 0) select _i)],_damage select _i]; }; }; //Sets of animations if ((_vInfo select 1) isEqualTo "civ" && (_vInfo select 2) isEqualTo "B_Heli_Light_01_F" && !((_vInfo select 8) isEqualTo 13)) then { [_vehicle,"civ_littlebird",true] remoteExecCall ["life_fnc_vehicleAnimate",_unit]; }; if ((_vInfo select 1) isEqualTo "cop" && ((_vInfo select 2)) in ["C_Offroad_01_F","B_MRAP_01_F","C_SUV_01_F","C_Hatchback_01_sport_F","B_Heli_Light_01_F","B_Heli_Transport_01_F"]) then { [_vehicle,"cop_offroad",true] remoteExecCall ["life_fnc_vehicleAnimate",_unit]; }; if ((_vInfo select 1) isEqualTo "med" && (_vInfo select 2) isEqualTo "C_Offroad_01_F") then { [_vehicle,"med_offroad",true] remoteExecCall ["life_fnc_vehicleAnimate",_unit]; }; [1,_spawntext] remoteExecCall ["life_fnc_broadcast",_unit]; serv_sv_use deleteAt _servIndex;
Neue Datei \Function\System\fn_vehicleImpound.sqfSpoiler anzeigen
C
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_vehicleStore.sqf Author: Bryan "Tonic" Boardwine Description: Stores the vehicle in the 'Garage' */ private ["_vehicle","_impound","_vInfo","_vInfo","_plate","_uid","_query","_sql","_unit","_trunk","_vehItems","_vehMags","_vehWeapons","_vehBackpacks","_cargo","_saveItems","_storetext","_resourceItems","_fuel","_damage","_itemList","_totalweight","_weight","_thread"]; _vehicle = [_this,0,objNull,[objNull]] call BIS_fnc_param; _impound = [_this,1,false,[true]] call BIS_fnc_param; _unit = [_this,2,objNull,[objNull]] call BIS_fnc_param; _storetext = [_this,3,"",[""]] call BIS_fnc_param; _resourceItems = LIFE_SETTINGS(getArray,"save_vehicle_items"); if (isNull _vehicle || isNull _unit) exitWith {life_impound_inuse = false; (owner _unit) publicVariableClient "life_impound_inuse";life_garage_store = false;(owner _unit) publicVariableClient "life_garage_store";}; //Bad data passed. _vInfo = _vehicle getVariable ["dbInfo",[]]; if (count _vInfo > 0) then { _plate = _vInfo select 1; _uid = _vInfo select 0; }; // save damage. if (LIFE_SETTINGS(getNumber,"save_vehicle_damage") isEqualTo 1) then { _damage = getAllHitPointsDamage _vehicle; _damage = _damage select 2; } else { _damage = []; }; _damage = [_damage] call DB_fnc_mresArray; // because fuel price! if (LIFE_SETTINGS(getNumber,"save_vehicle_fuel") isEqualTo 1) then { _fuel = (fuel _vehicle); } else { _fuel = 1; }; if (_impound) exitWith { if (count _vInfo isEqualTo 0) then { life_impound_inuse = false; (owner _unit) publicVariableClient "life_impound_inuse"; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; }; } else { // no free repairs! _query = format ["UPDATE vehicles SET active='0', impound='1', fuel='%3', damage='%4' WHERE pid='%1' AND plate='%2'",_uid , _plate, _fuel, _damage]; _thread = [_query,1] call DB_fnc_asyncCall; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; }; life_impound_inuse = false; (owner _unit) publicVariableClient "life_impound_inuse"; }; }; // not persistent so just do this! if (count _vInfo isEqualTo 0) exitWith { [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; }; if (_uid != getPlayerUID _unit) exitWith { [1,"STR_Garage_Store_NoOwnership",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; }; // sort out whitelisted items! _trunk = _vehicle getVariable ["Trunk", [[], 0]]; _itemList = _trunk select 0; _totalweight = 0; _items = []; if (LIFE_SETTINGS(getNumber,"save_vehicle_virtualItems") isEqualTo 1) then { if (LIFE_SETTINGS(getNumber,"save_vehicle_illegal") isEqualTo 1) then { private ["_isIllegal", "_blacklist"]; _blacklist = false; _profileQuery = format ["SELECT name FROM players WHERE pid='%1'", _uid]; _profileName = [_profileQuery, 2] call DB_fnc_asyncCall; _profileName = _profileName select 0; { _isIllegal = M_CONFIG(getNumber,"VirtualItems",(_x select 0),"illegal"); _isIllegal = if (_isIllegal isEqualTo 1) then { true } else { false }; if (((_x select 0) in _resourceItems) || (_isIllegal)) then { _items pushBack[(_x select 0),(_x select 1)]; _weight = (ITEM_WEIGHT(_x select 0)) * (_x select 1); _totalweight = _weight + _totalweight; }; if (_isIllegal) then { _blacklist = true; }; } foreach _itemList; if (_blacklist) then { [_uid, _profileName, "481"] remoteExecCall["life_fnc_wantedAdd", RSERV]; _query = format ["UPDATE vehicles SET blacklist='1' WHERE pid='%1' AND plate='%2'", _uid, _plate]; _thread = [_query, 1] call DB_fnc_asyncCall; }; } else { { if ((_x select 0) in _resourceItems) then { _items pushBack[(_x select 0),(_x select 1)]; _weight = (ITEM_WEIGHT(_x select 0)) * (_x select 1); _totalweight = _weight + _totalweight; }; } forEach _itemList; }; _trunk = [_items, _totalweight]; } else { _trunk = [[], 0]; }; if (LIFE_SETTINGS(getNumber,"save_vehicle_inventory") isEqualTo 1) then { _vehItems = getItemCargo _vehicle; _vehMags = getMagazineCargo _vehicle; _vehWeapons = getWeaponCargo _vehicle; _vehBackpacks = getBackpackCargo _vehicle; _cargo = [_vehItems,_vehMags,_vehWeapons,_vehBackpacks]; // no items? clean the array so the database looks pretty if ((count (_vehItems select 0) isEqualTo 0) && (count (_vehMags select 0) isEqualTo 0) && (count (_vehWeapons select 0) isEqualTo 0) && (count (_vehBackpacks select 0) isEqualTo 0)) then {_cargo = [];}; } else { _cargo = []; }; // prepare _trunk = [_trunk] call DB_fnc_mresArray; _cargo = [_cargo] call DB_fnc_mresArray; // update _query = format ["UPDATE vehicles SET active='0', impound='1', inventory='%3', gear='%4', fuel='%5', damage='%6' WHERE pid='%1' AND plate='%2'", _uid, _plate, _trunk, _cargo, _fuel, _damage]; _thread = [_query,1] call DB_fnc_asyncCall; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; }; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; [1,_storetext] remoteExecCall ["life_fnc_broadcast",(owner _unit)];
fn_vehicleStore.sqfSpoiler anzeigen
C
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_vehicleStore.sqf Author: Bryan "Tonic" Boardwine Description: Stores the vehicle in the 'Garage' */ private ["_vehicle","_impound","_vInfo","_vInfo","_plate","_uid","_query","_sql","_unit","_trunk","_vehItems","_vehMags","_vehWeapons","_vehBackpacks","_cargo","_saveItems","_storetext","_resourceItems","_fuel","_damage","_itemList","_totalweight","_weight","_thread"]; _vehicle = [_this,0,objNull,[objNull]] call BIS_fnc_param; _impound = [_this,1,false,[true]] call BIS_fnc_param; _unit = [_this,2,objNull,[objNull]] call BIS_fnc_param; _storetext = [_this,3,"",[""]] call BIS_fnc_param; _resourceItems = LIFE_SETTINGS(getArray,"save_vehicle_items"); if (isNull _vehicle || isNull _unit) exitWith {life_impound_inuse = false; (owner _unit) publicVariableClient "life_impound_inuse";life_garage_store = false;(owner _unit) publicVariableClient "life_garage_store";}; //Bad data passed. _vInfo = _vehicle getVariable ["dbInfo",[]]; if (count _vInfo > 0) then { _plate = _vInfo select 1; _uid = _vInfo select 0; }; // save damage. if (LIFE_SETTINGS(getNumber,"save_vehicle_damage") isEqualTo 1) then { _damage = getAllHitPointsDamage _vehicle; _damage = _damage select 2; } else { _damage = []; }; _damage = [_damage] call DB_fnc_mresArray; // because fuel price! if (LIFE_SETTINGS(getNumber,"save_vehicle_fuel") isEqualTo 1) then { _fuel = (fuel _vehicle); } else { _fuel = 1; }; if (_impound) exitWith { if (count _vInfo isEqualTo 0) then { life_impound_inuse = false; (owner _unit) publicVariableClient "life_impound_inuse"; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; }; } else { // no free repairs! _query = format ["UPDATE vehicles SET active='0', impound='0', fuel='%3', damage='%4' WHERE pid='%1' AND plate='%2'",_uid , _plate, _fuel, _damage]; _thread = [_query,1] call DB_fnc_asyncCall; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; }; life_impound_inuse = false; (owner _unit) publicVariableClient "life_impound_inuse"; }; }; // not persistent so just do this! if (count _vInfo isEqualTo 0) exitWith { [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; }; if (_uid != getPlayerUID _unit) exitWith { [1,"STR_Garage_Store_NoOwnership",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; }; // sort out whitelisted items! _trunk = _vehicle getVariable ["Trunk", [[], 0]]; _itemList = _trunk select 0; _totalweight = 0; _items = []; if (LIFE_SETTINGS(getNumber,"save_vehicle_virtualItems") isEqualTo 1) then { if (LIFE_SETTINGS(getNumber,"save_vehicle_illegal") isEqualTo 1) then { private ["_isIllegal", "_blacklist"]; _blacklist = false; _profileQuery = format ["SELECT name FROM players WHERE pid='%1'", _uid]; _profileName = [_profileQuery, 2] call DB_fnc_asyncCall; _profileName = _profileName select 0; { _isIllegal = M_CONFIG(getNumber,"VirtualItems",(_x select 0),"illegal"); _isIllegal = if (_isIllegal isEqualTo 1) then { true } else { false }; if (((_x select 0) in _resourceItems) || (_isIllegal)) then { _items pushBack[(_x select 0),(_x select 1)]; _weight = (ITEM_WEIGHT(_x select 0)) * (_x select 1); _totalweight = _weight + _totalweight; }; if (_isIllegal) then { _blacklist = true; }; } foreach _itemList; if (_blacklist) then { [_uid, _profileName, "481"] remoteExecCall["life_fnc_wantedAdd", RSERV]; _query = format ["UPDATE vehicles SET blacklist='1' WHERE pid='%1' AND plate='%2'", _uid, _plate]; _thread = [_query, 1] call DB_fnc_asyncCall; }; } else { { if ((_x select 0) in _resourceItems) then { _items pushBack[(_x select 0),(_x select 1)]; _weight = (ITEM_WEIGHT(_x select 0)) * (_x select 1); _totalweight = _weight + _totalweight; }; } forEach _itemList; }; _trunk = [_items, _totalweight]; } else { _trunk = [[], 0]; }; if (LIFE_SETTINGS(getNumber,"save_vehicle_inventory") isEqualTo 1) then { _vehItems = getItemCargo _vehicle; _vehMags = getMagazineCargo _vehicle; _vehWeapons = getWeaponCargo _vehicle; _vehBackpacks = getBackpackCargo _vehicle; _cargo = [_vehItems,_vehMags,_vehWeapons,_vehBackpacks]; // no items? clean the array so the database looks pretty if ((count (_vehItems select 0) isEqualTo 0) && (count (_vehMags select 0) isEqualTo 0) && (count (_vehWeapons select 0) isEqualTo 0) && (count (_vehBackpacks select 0) isEqualTo 0)) then {_cargo = [];}; } else { _cargo = []; }; // prepare _trunk = [_trunk] call DB_fnc_mresArray; _cargo = [_cargo] call DB_fnc_mresArray; // update _query = format ["UPDATE vehicles SET active='0', impound='0', inventory='%3', gear='%4', fuel='%5', damage='%6' WHERE pid='%1' AND plate='%2'", _uid, _plate, _trunk, _cargo, _fuel, _damage]; _thread = [_query,1] call DB_fnc_asyncCall; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; }; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; [1,_storetext] remoteExecCall ["life_fnc_broadcast",(owner _unit)];
fn_insertVehicle.sqfSpoiler anzeigen
C
Alles anzeigen/* File: fn_insertVehicle.sqf Author: Bryan "Tonic" Boardwine Description: Inserts the vehicle into the database */ private ["_query","_sql"]; params [ "_uid", "_side", "_type", "_className", ["_color",-1,[0]], ["_plate",-1,[0]] ]; //Stop bad data being passed. if (_uid isEqualTo "" || _side isEqualTo "" || _type isEqualTo "" || _className isEqualTo "" || _color isEqualTo -1 || _plate isEqualTo -1) exitWith {}; _query = format ["INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage, impound) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""', '%5', '%6','""[]""','""[]""','0')",_side,_className,_type,_uid,_color,_plate]; [_query,1] call DB_fnc_asyncCall;
und in der config.cppSpoiler anzeigen
Das dürfte es auch schon gewesen sein.
-
Weils mit ACE nicht geht
ACE Stellt dan sofort auf Normal Lautstärke -
mm_building2 müste policestation sein mach doch mal die pbos rein und guck im Editor ....
-
wiso kannst auch nur für Pfirsiche machen

einfach
-
-
dan nim die Gebäude nicht von der Australia map xD die gibs auch einzeln
http://steamcommunity.com/sharedfiles/filedetails/?id=539126468&searchtext=
da soll das auch gefixt sein
-
aber ihr habt eine Andere Map ??? oder Australia
-
ja nach ner zeit .... sagt er auch nach ca 5 min weil das Gebäude ein Fehler hat mit den Blöden Glas Türen dachte nur das es schon längst gefixt wurde

jetzt Noch ne Frage von wo hast du das HQ ??????
-
ja für die anderen türen aber nich die Glas tür xD die kann jeder auf machen Lese bitte mal sein problem richtig durch !
Ich kenn die Police Station von Australia

-
wurde das Haus per Editor gesetzt ?
-
der fehler ligt am Gebaude selbst dachte da gabs schon ne fix für

-
geile sache
nicht mehr 100 Jahre scrollen
aber ich glaube wir haben zu gut gearbeitet xD