Beiträge von ChickenWeed
-
-
-
-
-
-
-
Ich probiere es erstmal alleine!
kriege das schon hin!
-
Ummm wie soll ich das am besten um bauen?
-
Irgendjemand eine Idee?
-
-
Er sieht das Auto nicht ^^.
@Team-Wings
Entweder du enfernten überall mal die Höhe.
Oder du Versuchst noch _object enableSimulation false; in der vehicleMenu3DPreview unter dem hideObject hinzuzufügenNope geht immer noch nicht
-
-
-
So hier die Datein:
Code
Alles anzeigen/** * Bibliothèque de fonctions permettant la visualisation 3D d'objets * * Copyright (C) 2014 Team ~R3F~ * * This program is free software under the terms of the GNU General Public License version 3. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* File: fn_vehicleShopInit3DPreview.sqf Modified By: NiiRoZz Description: Called when a player open the vehicle shop and setup cam and the while for rotate around the vehicle */ // Creating a camera. life_preview_3D_vehicle_cam = "camera" camCreate [21708.67, 5972.299, 200]; life_preview_3D_vehicle_cam cameraEffect ["Internal", "BACK"]; life_preview_3D_vehicle_cam camSetFocus [-1, -1]; showCinemaBorder false; life_preview_3D_vehicle_cam camCommit 0; life_preview_3D_vehicle_object = objNull; // Thread execution performing a continuous rotation of the camera around the view object. 0 spawn { // Until we left the visualization. for "_i" from 0 to 1 step 0 do { if (isNull life_preview_3D_vehicle_cam) exitWith {}; private ["_object","_distanceCam","_azimuthCam"]; // Waiting for a view object. waitUntil {!isNull life_preview_3D_vehicle_object}; _object = life_preview_3D_vehicle_object; _distanceCam = 2.25 * ( [boundingBoxReal _object select 0 select 0, boundingBoxReal _object select 0 select 2] distance [boundingBoxReal _object select 1 select 0, boundingBoxReal _object select 1 select 2] ); _azimuthCam = 0; life_preview_3D_vehicle_cam camSetTarget _object; life_preview_3D_vehicle_cam camSetPos (_object modelToWorld [_distanceCam * sin _azimuthCam, _distanceCam * cos _azimuthCam, _distanceCam * 0.33]); life_preview_3D_vehicle_cam camCommit 0; // Rotation around the object. for "_i" from 0 to 1 step 0 do { if (!(life_preview_3D_vehicle_object isEqualTo _object)) exitWith {}; _azimuthCam = _azimuthCam + 1.00; life_preview_3D_vehicle_cam camSetPos (_object modelToWorld [_distanceCam * sin _azimuthCam, _distanceCam * cos _azimuthCam, _distanceCam * 0.33]); life_preview_3D_vehicle_cam camCommit 0.05; sleep 0.05; }; }; };
Code
Alles anzeigen#include <macro.h> /* File: fn_vehicleShopLBChange.sqf Author: Bryan "Tonic" Boardwine Description: Called when a new selection is made in the list box and displays various bits of information about the vehicle. */ disableSerialization; private["_control","_index","_className","_basePrice","_vehicleInfo","_colorArray","_ctrl"]; _control = _this select 0; _index = _this select 1; //Fetch some information. _className = _control lbData _index; _vIndex = _control lbValue _index; _vehicleList = [life_veh_shop select 0] call life_fnc_vehicleListCfg; _basePrice = (_vehicleList select _vIndex) select 1; _vehicleInfo = [_className] call life_fnc_fetchVehInfo; _trunkSpace = [_className] call life_fnc_vehicleWeightCfg; [_className] call life_fnc_vehicleShop3DPreview; ctrlShow [2330,true]; (getControl(2300,2303)) ctrlSetStructuredText parseText format[ "Rental Price: <t color='#8cff9b'>$%1</t><br/>Ownership Price: <t color='#8cff9b'>$%2</t><br/>Max Speed: %3 km/h<br/>Horse Power: %4<br/>Passenger Seats: %5<br/>Trunk Capacity: %6<br/>Fuel Capacity: %7<br/>Armor Rating: %8", [_basePrice] call life_fnc_numberText, [round(_basePrice * 1.5)] call life_fnc_numberText, _vehicleInfo select 8, _vehicleInfo select 11, _vehicleInfo select 10, if(_trunkSpace == -1) then {"None"} else {_trunkSpace}, _vehicleInfo select 12, _vehicleInfo select 9 ]; _ctrl = getControl(2300,2304); lbClear _ctrl; _colorArray = [_className] call life_fnc_vehicleColorCfg; for "_i" from 0 to count(_colorArray)-1 do { if((_colorArray select _i) select 1 == (life_veh_shop select 2)) then { _temp = [_className,_i] call life_fnc_vehicleColorStr; _ctrl lbAdd format["%1",_temp]; _ctrl lbSetValue [(lbSize _ctrl)-1,_i]; }; }; if(_className in (__GETC__(life_vShop_rentalOnly))) then { ctrlEnable [2309,false]; } else { if(!(life_veh_shop select 3)) then { ctrlEnable [2309,true]; }; }; lbSetCurSel[2304,0]; if((lbSize _ctrl)-1 != -1) then { ctrlShow[2304,true]; } else { ctrlShow[2304,false]; }; true;
Code
Alles anzeigen/* File: fn_vehicleShopMenu.sqf Author: Bryan "Tonic" Boardwine Description: Blah */ private["_shop","_sideCheck","_spawnPoints","_shopFlag","_disableBuy"]; _shop = [(_this select 3),0,"",[""]] call BIS_fnc_param; _sideCheck = [(_this select 3),1,sideUnknown,[civilian]] call BIS_fnc_param; _spawnPoints = [(_this select 3),2,"",["",[]]] call BIS_fnc_param; _shopFlag = [(_this select 3),3,"",[""]] call BIS_fnc_param; _disableBuy = [(_this select 3),5,false,[true]] call BIS_fnc_param; disableSerialization; //Long boring series of checks if(dialog) exitWith {}; if(_shop == "") exitWith {}; if(_sideCheck != sideUnknown && {playerSide != _sideCheck}) exitWith {hintSilent localize "STR_Shop_Veh_NotAllowed"}; if(!createDialog "Life_Vehicle_Shop_v2_3D") exitWith {}; life_veh_shop = [_shop,_spawnpoints,_shopFlag,_disableBuy]; //Store it so so other parts of the system can access it. ctrlSetText [2301,((_this select 3) select 4)]; if(_disableBuy) then { //Disable the buy button. ctrlEnable [2309,false]; }; //Fetch the shop config. _vehicleList = [_shop] call life_fnc_vehicleListCfg; _control = ((findDisplay 2300) displayCtrl 2302); lbClear _control; //Flush the list. ctrlShow [2330,false]; ctrlShow [2304,false]; //Loop through { _className = _x select 0; _basePrice = _x select 1; _vehicleInfo = [_className] call life_fnc_fetchVehInfo; _control lbAdd (_vehicleInfo select 3); _control lbSetPicture [(lbSize _control)-1,(_vehicleInfo select 2)]; _control lbSetData [(lbSize _control)-1,_className]; _control lbSetValue [(lbSize _control)-1,_ForEachIndex]; } foreach _vehicleList; [] call life_fnc_vehicleShopInit3DPreview; ((findDisplay 2300) displayCtrl 2302) lbSetCurSel 0;
Falls du noch andere Dateien brauch sag einfach welche!
Mfg Pius von Team-Wings
-
-
Kann jemand das vielleicht testen? Vielleicht mach ich ja was falsch?
-
-
nope geht immer noch nicht habe den Script in core/cop gepackt alles in der Funktion.h definiert und dann mit onButtonClick = "0 spawn life_fnc_sperrzone"; im Dialog ausgeführt doch wenn ich als Cop den Button klicke passiert nichts!
-
-
Ahh also onButtonclick: 0 spawn life_fnc_sperrzone so?