Autor:RYN_Ryan
Edit by Deadongaming
1. Ladet euch den Schiffswrack Ordner herunter und fügt den Ordner unter life_server\functions ein
2. Geht in die Init.sqf im life_server und schreibt ganz unten folgendes rein:
3. Geht jetzt in eure mpmisson und ersetzt folgenden case in eurem keyHandler.sqf
Code
case 20: {
if(!_alt && !_ctrlKey) then {
if(vehicle player != player && alive vehicle player) then {
if((vehicle player) in life_vehicles) then {
[vehicle player] spawn life_fnc_openInventory;
};
} else {
if((cursorTarget isKindOf "Land_Wreck_Traw_F" OR cursorTarget isKindOf "Land_Wreck_Traw2_F" OR cursorTarget isKindOf "Car" OR cursorTarget isKindOf "Air" OR cursorTarget isKindOf "Ship" OR cursorTarget isKindOf "House_F") && player distance cursorTarget < 10 && vehicle player == player && alive cursorTarget) then
{
if(cursorTarget in life_vehicles OR
{
!(cursorTarget getVariable ["locked",true])}) then
{
[cursorTarget] spawn life_fnc_openInventory;
};
if (cursorTarget isKindOf "Land_Wreck_Traw_F" OR cursorTarget isKindOf "Land_Wreck_Traw2_F") then
{
[cursorTarget] spawn life_fnc_openInventory;
};
};
};
};
};
Alles anzeigen
4. Sucht jetzt die fn_broadcast.sqf und ersetzt den Inhalt mit diesem Code hier:
Code
/*
File: fn_broadcast.sqf Author: Bryan "Tonic" Boardwine
Description: Broadcast system used in the life mission for multi-notification purposes.
*/
private["_type","_message"];
_type = [_this,0,0,[[],0]] call BIS_fnc_param;_message = [_this,1,"",[""]] call BIS_fnc_param;_localize = [_this,2,false,[false]] call BIS_fnc_param;if(_message == "") exitwith {};
if(_localize) exitWith { _arr = _this select 3;
_msg = switch(count _arr) do {
case 0: {localize _message;};
case 1: {format[localize _message,_arr select 0];};
case 2: {format[localize _message,_arr select 0, _arr select 1];}; case 3: {format[localize _message,_arr select 0, _arr select 1, _arr select 2];};
case 4: {format[localize _message,_arr select 0, _arr select 1, _arr select 2, _arr select 3];};
};
if(typeName _type == typeName []) then
{
for "_i" from 0 to (count _type)-1 do
{ switch((_type select _i)) do
{
case 0: {systemChat _msg;};
case 1: {hint _msg;};
case 2: {titleText[_msg,"PLAIN"];};
};
};
} else {
switch (_type) do
{
case 0: {systemChat _msg;};
case 1: {hint _msg;};
case 2: {titleText[_msg,"PLAIN"];}; }; };};if(typeName _type == typeName []) then{ for "_i" from 0 to (count _type)-1 do { switch((_type select _i)) do {
case 0: {systemChat _message};
case 1: {hint format["%1", _message]};
case 2: {titleText[format["%1",_message],"PLAIN"];};
case 5: {hint parseText format["%1", _message]}; }; };} else{ switch (_type) do {
case 0: {systemChat _message};
case 1: {hint format["%1", _message]};
case 2: {titleText[format["%1",_message],"PLAIN"];};
case 5: {hint parseText format["%1", _message]}; };};
Alles anzeigen
5. Fügt folgendes in eure fn_useItem.sqf ein:
Code
case (_item == "uwsl"): {
_OBJ = nearestObject [player, "Land_Wreck_Traw_F"];
if (_OBJ==objNull) then
{
_OBJ = nearestObject [player, "Land_Wreck_Traw2_F"];
};
if (("Land_Wreck_Traw_F" == typeOf _OBJ) OR ("Land_Wreck_Traw2_F" == typeOf _OBJ)&&(player distance _OBJ < 30)) then {
if (!([false,_item,1] call life_fnc_handleInv)) exitWith {
hint "Error: Object not found";
};
_ship = _OBJ getVariable "opened";
_ship_obj = _OBJ;
if (_ship) then
{
hint "Das Schiff wurde bereits geoeffnet!"
};
if (!_ship) then {
hint "The charge has been planted! Get away from the shipwreck!";
playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", _ship_obj];
sleep 10;
"M_NLAW_AT_F" createVehicle [getPos _ship_obj select 0, getPos _ship_obj select 1, 0];
schiffwoffen = true;
publicVariableServer "schiffwoffen";
};
};
};
Alles anzeigen
6. Sucht die fn_openInventory.sqf und sucht diesen Code:
Code
if(isNull _vehicle OR !(_vehicle isKindOf "Car" OR _vehicle isKindOf "Air" OR _vehicle isKindOf "Ship" OR _vehicle isKindOf "House_F" OR _vehicle isKindOF "Box")) exitWith {}; //Either a null or invalid vehicle type.
ersetzten durch:
Code
if(isNull _vehicle OR !(("Land_Wreck_Traw_F" == typeOf _vehicle) OR ("Land_Wreck_Traw2_F" == typeOf _vehicle) OR _vehicle isKindOf "Car" OR _vehicle isKindOf "Air" OR _vehicle isKindOf "Ship" OR _vehicle isKindOf "House_F" OR _vehicle isKindOF "Box")) exitWith {};
7. Nun müsst ihr nur noch ein Item erstellen in der Config_vItems.hpp
Code
class uwsl {
variable = "uwsl";
displayName = "STR_Item_uwsl";
weight = 2;
buyPrice = 7600;
sellPrice = 4300;
illegal = false;
edible = -1;
icon = "Underwaterexplosive";
};
Fertig !