hallo, und zwar habe ich das Problem dass ich zwei Scripts habe die nicht auf dem Server funktionieren. meine Version ins Altis Life 4.0
hier das Spitzhacken Script:
fn_keyhandler
- //Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)
- case _interactionKey:
- {
- if(!life_action_inUse) then {
- [] spawn
- {
- private["_handle"];
- _handle = [] spawn life_fnc_actionKeyHandler;
- waitUntil {scriptDone _handle};
- life_action_inUse = false;
- };
- };
- if((vehicle player == player) ) then
- {
- if(life_action_gather) exitWith{hint "Nicht so schnell!"};
- {
- _str = [_x] call life_fnc_varToStr;
- _val = missionNameSpace getVariable _x;
- if(_val > 0 ) then
- {
- if( _str == "Spitzhacke"
_str == "pickaxe" ) then
- {
- [] spawn life_fnc_pickAxeUse;
- };
- };
- } foreach life_inv_items;
- };
- };
fn_pickaxeUse
- /*
- File: fn_pickaxeUse.sqf
- Author: Bryan "Tonic" Boardwine
- Description:
- Main functionality for pickaxe in mining.
- */
- closeDialog 0;
- private["_mine","_itemWeight","_diff","_itemName","_val"];
- switch (true) do
- {
- case (player distance (getMarkerPos "lead_1") < 30): {_mine = "copperore"; _val = round(random(10));};
- case (player distance (getMarkerPos "iron_1") < 30): {_mine = "ironore"; _val = round(random(10));};
- case (player distance (getMarkerPos "cobalt_1") < 30): {_mine = "cobaltore"; _val = round(random(10));};
- case (player distance (getMarkerPos "silber_1") < 30): {_mine = "silberore"; _val = round(random(10));};
- case (player distance (getMarkerPos "bronxe_2") < 30): {_mine = "bronzeore"; _val = round(random(10));};
- case (player distance (getMarkerPos "zink_1") < 30): {_mine = "zinkore"; _val = round(random(10));};
- case (player distance (getMarkerPos "salt_1") < 120) : {_mine = "salt"; _val = round(random(10));};
- case (player distance (getMarkerPos "diamond_1") < 50): {_mine = "diamond"; _val = round(random(10));};
- case (player distance (getMarkerPos "rock_1") < 50): {_mine = "rock"; _val = round(random(10));};
- default {_mine = "";};
- };
- //Mine check
- if(_mine == "") exitWith {hint localize "STR_ISTR_Pick_NotNear"};
- if(vehicle player != player) exitWith {hint localize "STR_ISTR_Pick_MineVeh";};
- _diff = [_mine,_val,life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff;
- if(_diff == 0) exitWith {hint localize "STR_NOTF_InvFull"};
- life_action_gather = true;
- for "_i" from 0 to 2 do
- {
- player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
- waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";};
- sleep 2.5;
- };
- 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"];
- };
- life_action_gather = false;
und hier das mit den Festnehmen ich habe die Kabelbinder schon eingefügt aber irgendwas stimmt nicht wenn ich als Cop drinnen bin dann steht, da dass man die rebbeln license braucht ich bitte um hilfe
fn_keyhandler
- //Restraining (Shift + R)
- case 19: {
- if(_shift) then {_handled = true;};
- if(_shift && playerSide == west && {!isNull cursorTarget} && {cursorTarget isKindOf "Man"} && {(isPlayer cursorTarget)} && {(side cursorTarget in [civilian,independent])} && {alive cursorTarget} && {cursorTarget distance player < 3.5} && {!(cursorTarget GVAR "Escorting")} && {!(cursorTarget GVAR "restrained")} && {speed cursorTarget < 1}) then {
- [] call life_fnc_restrainAction;
- [player,"uncuff"] call life_fnc_globalSound;
- }
- else
- {
- if !(license_civ_rebel) exitWith { hint "Du musst zuerst das Rebellentraining absolvieren um jemanden zu fesseln!"};
- if(_shift && playerSide == civilian && {!isNull cursorTarget} && {cursorTarget isKindOf "Man"} && {(currentWeapon player == primaryWeapon player OR currentWeapon player == handgunWeapon player)} && {currentWeapon player != ""} && {(isPlayer cursorTarget)} && {alive cursorTarget} && {cursorTarget distance player < 3.5} && {animationState cursorTarget == "Incapacitated"} && {!(cursorTarget GVAR "Escorting")} && {!(cursorTarget GVAR "restrained")} && {speed cursorTarget < 1}) then
- {
- if([false,"zipties",2] call life_fnc_handleInv) then
- {
- [] call life_fnc_restrainAction;
- [player,"uncuff"] call life_fnc_globalSound;
- hint "Benutze die Action, um weitere Aktionen anzuzeigen";
- }
- else
- {
- hint "Du hast keine Kabelbinder dabei!";
- };
- };
- };
- };