Ja aber es ist nerfig nach jedem respawn die Spawnmusik wieder und wieder zuhören
Beiträge von Deathman
-
-
Also darunter?
if (life_firstSpawn) then {
life_firstSpawn = false;
[] call life_fnc_welcomeNotification;
};
playSound "Welcome";
Nur als kleine anmerkung wenn du diesen codeplaysound "Welcome"; darunter schreibst kommt der Sound nach jedem Respawn also würde ich es so machen
-
-
ok hast du mir das gefixte jetzt schon oben in der Antwort
-
Hey leute ich habe ein problem mit der VInteractionMenu
Error im Rpt
Spoiler anzeigen
Code: RPT Log
Alles anzeigen16:12:39 Error in expression <e_fnc_impoundAction;"; if (!_curTarget {!dialog} && {!life_action_inUse} && {!(> 16:12:39 Error position: <{!dialog} && {!life_action_inUse} && {!(> 16:12:39 Error Missing ) 16:12:39 File core\vehicle\fn_vInteractionMenu.sqf [life_fnc_vInteractionMenu], line 154 16:12:39 Error in expression <e_fnc_impoundAction;"; if (!_curTarget {!dialog} && {!life_action_inUse} && {!(> 16:12:39 Error position: <{!dialog} && {!life_action_inUse} && {!(> 16:12:39 Error Missing ) 16:12:39 File core\vehicle\fn_vInteractionMenu.sqf [life_fnc_vInteractionMenu], line 154
Die Datei
Spoiler anzeigen
Code: fn_vInteractionMenu.sqf
Alles anzeigen#include "..\..\script_macros.hpp" /* Author: DerOnkel & Williams edit by Deathman Description: Vehicle Interaction Menu */ private["_curTarget","_isVehicle","_display","_btn1","_btn2","_btn3","_btn4","_btn5","_btn6","_btn7","_btn8","_btn9","_btn10"]; disableSerialization; _curTarget = param [0,ObjNull,[ObjNull]]; _damage = 0; { if(_x > 0.34) then { _damage = _damage + _x; }; } forEach ((getAllHitPointsDamage _curTarget) # 2); if(isNull _curTarget) exitWith {closeDialog 0;}; _isVehicle = if((_curTarget isKindOf "landVehicle") OR (_curTarget isKindOf "Ship") OR (_curTarget isKindOf "Air")) then {true} else {false}; if(!_isVehicle) exitWith {closeDialog 0;}; if(!dialog) then { switch (playerside) do { case west: {createDialog "vInteraction_Menu_8";}; case independent: {createDialog "vInteraction_Menu_7";}; case civilian: {createDialog "vInteraction_Menu_7";}; }; }; _display = findDisplay 37400; _background = _display displayCtrl 37401; _background ctrlsetFade 0; _background ctrlcommit 5; _btn1 = _display displayCtrl 37450; _btn2 = _display displayCtrl 37451; _btn3 = _display displayCtrl 37452; _btn4 = _display displayCtrl 37453; _btn5 = _display displayCtrl 37454; _btn6 = _display displayCtrl 37455; _btn7 = _display displayCtrl 37456; _btn8 = _display displayCtrl 37457; life_vInact_curTarget = _curTarget; switch (playerside) do { case west: { _Btn1 ctrlShow false; _Btn2 ctrlShow false; _Btn3 ctrlShow false; _Btn4 ctrlShow false; _Btn5 ctrlShow false; _Btn6 ctrlShow false; _Btn7 ctrlShow false; _Btn8 ctrlShow false; _btn1 ctrlSetText "textures\interaction\Vehicle\icon_close.paa"; _btn1 ctrlSetTooltip "Menü Schließen"; _btn1 buttonSetAction "closeDialog 0;"; if(_damage > 0) then { _btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa"; _btn2 ctrlSetTooltip "Reparieren"; _btn2 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_repairTruck;"; _btn2 ctrlEnable false; if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false;}; } else { _btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa"; _btn2 ctrlSetTooltip "Reparieren"; _btn2 ctrlEnable false; }; _btn3 ctrlSetText "textures\interaction\Vehicle\icon_push.paa"; _btn3 ctrlSetTooltip "Schieben"; _btn3 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pushObject;"; if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn3 ctrlEnable true;} else {_Btn3 ctrlEnable false}; _btn4 ctrlSetText "textures\interaction\Vehicle\icon_register.paa"; _btn4 ctrlSetTooltip "Besitzer Abfrage"; _btn4 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_searchVehAction;"; _btn5 ctrlSetText "textures\interaction\Vehicle\icon_search.paa"; _btn5 ctrlSetTooltip "Durchsuchen"; _btn5 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_vehInvSearch;"; _btn6 ctrlSetText "textures\interaction\Vehicle\icon_pullout.paa"; _btn6 ctrlSetTooltip "Herausziehen"; _btn6 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pulloutAction;"; if(count crew _curTarget == 0) then {_Btn6 ctrlEnable false;}; _btn7 ctrlSetText "textures\interaction\Vehicle\icon_impound.paa"; _btn7 ctrlSetTooltip "Beschlagnahmen"; _btn7 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_impoundAction;"; if (!_curTarget {!dialog} && {!life_action_inUse} && {!(player getVariable ["playerSurrender",false])} && {!(player getVariable ["restrained",false])} && {!life_isknocked} && {!life_istazed}) then { _btn8 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa"; _btn8 ctrlSetTooltip "Kofferraum"; _btn8 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_openInventory"; _btn8 ctrlEnable true; } else { _btn8 ctrlSetTooltip "Kofferaum"; _btn8 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa"; _btn8 ctrlEnable false; }; { _x ctrlSetFade 0; _x ctrlCommit 3; _x ctrlShow true; } forEach [_Btn1,_Btn2,_Btn3,_Btn4,_Btn5,_Btn6,_Btn7,_Btn8]; }; case independent: { _Btn1 ctrlShow false; _Btn2 ctrlShow false; _Btn3 ctrlShow false; _Btn4 ctrlShow false; _Btn5 ctrlShow false; _Btn6 ctrlShow false; _Btn7 ctrlShow false; _btn1 ctrlSetText "textures\interaction\Vehicle\icon_close.paa"; _btn1 ctrlSetTooltip "Menü Schließen"; _btn1 buttonSetAction "closeDialog 0;"; if(_damage > 0) then { _btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa"; _btn2 ctrlSetTooltip "Reparieren"; _btn2 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_repairTruck;"; _btn2 ctrlEnable false; if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false;}; } else { _btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa"; _btn2 ctrlSetTooltip "Reparieren"; _btn2 ctrlEnable false; }; _btn3 ctrlSetText "textures\interaction\Vehicle\icon_push.paa"; _btn3 ctrlSetTooltip "Schieben"; _btn3 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pushObject;"; if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn3 ctrlEnable true;} else {_Btn3 ctrlEnable false}; _btn4 ctrlSetText "textures\interaction\Vehicle\icon_pullout.paa"; _btn4 ctrlSetTooltip "Herausziehen"; _btn4 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pulloutAction;"; if(count crew _curTarget == 0) then {_Btn6 ctrlEnable false;}; _btn5 ctrlSetText "textures\interaction\Vehicle\icon_unflip.paa"; _btn5 ctrlSetTooltip "Unflip"; _btn5 buttonSetAction "closeDialog 0; life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5];"; if(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn5 ctrlEnable false;} else {_Btn5 ctrlEnable true;}; _btn6 ctrlSetText "textures\interaction\Vehicle\icon_impound.paa"; _btn6 ctrlSetTooltip "Beschlagnahmen"; _btn6 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_impoundAction;"; if (!_curTarget {!dialog} && {!life_action_inUse} && {!(player getVariable ["playerSurrender",false])} && {!(player getVariable ["restrained",false])} && {!life_isknocked} && {!life_istazed}) then { _btn7 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa"; _btn7 ctrlSetTooltip "Kofferraum"; _btn7 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_openInventory"; _btn7 ctrlEnable true; } else { _btn7 ctrlSetTooltip "Kofferaum"; _btn7 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa"; _btn7 ctrlEnable false; }; { _x ctrlSetFade 0; _x ctrlCommit 3; _x ctrlShow true; } forEach [_Btn1,_Btn2,_Btn3,_Btn4,_Btn5,_Btn6, _Btn7]; }; case civilian: { _Btn1 ctrlShow false; _Btn2 ctrlShow false; _Btn3 ctrlShow false; _Btn4 ctrlShow false; _Btn5 ctrlShow false; _Btn6 ctrlShow false; _Btn7 ctrlShow false; _btn1 ctrlSetText "textures\interaction\Vehicle\icon_close.paa"; _btn1 ctrlSetTooltip "Menü Schließen"; _btn1 buttonSetAction "closeDialog 0;"; if(_damage > 0) then { _btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa"; _btn2 ctrlSetTooltip "Reparieren"; _btn2 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_repairTruck;"; _btn2 ctrlEnable false; if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false;}; } else { _btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa"; _btn2 ctrlSetTooltip "Reparieren"; _btn2 ctrlEnable false; }; _btn3 ctrlSetText "textures\interaction\Vehicle\icon_push.paa"; _btn3 ctrlSetTooltip "Schieben"; _btn3 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pushObject;"; if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn3 ctrlEnable true;} else {_Btn3 ctrlEnable false}; _btn4 ctrlSetText "textures\interaction\Vehicle\icon_unflip.paa"; _btn4 ctrlSetTooltip "Unflip"; _btn4 buttonSetAction "closeDialog 0; life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5];"; if(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn4 ctrlEnable false;} else {_Btn4 ctrlEnable true;}; if (!_curTarget {!dialog} && {!life_action_inUse} && {!(player getVariable ["playerSurrender",false])} && {!(player getVariable ["restrained",false])} && {!life_isknocked} && {!life_istazed}) then { _btn5 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa"; _btn5 ctrlSetTooltip "Kofferraum"; _btn5 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_openInventory;"; _btn5 ctrlEnable true; } else { _btn5 ctrlSetTooltip "Kofferaum"; _btn5 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa"; _btn5 ctrlEnable false; }; if(_curTarget isKindOf "O_Truck_03_device_F") then { _btn6 ctrlSetText "textures\interaction\Vehicle\icon_mining.paa"; _btn6 ctrlSetTooltip "Abbau Starten"; _btn6 buttonSetAction "closedialog 0; [life_vInact_curTarget] spawn life_fnc_deviceMine;"; if(!isNil {(_curTarget getVariable "mining")} OR !local _curTarget && {_curTarget in life_vehicles}) then { _Btn6 ctrlEnable false; } else { _Btn6 ctrlEnable true; }; } else { _btn6 ctrlSetText "textures\interaction\Vehicle\icon_mining.paa"; _btn6 ctrlSetTooltip "Abbau Starten"; _btn6 ctrlEnable false; }; if(license_civ_rebel) then { _Btn7 ctrlSetText "textures\interaction\Vehicle\icon_pullout.paa"; _Btn7 ctrlSetTooltip "Herausziehen"; _Btn7 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pulloutAction;"; if(count crew _curTarget == 0) then {_Btn4 ctrlEnable false;}; } else{ _Btn7 ctrlShow false; }; { _x ctrlSetFade 0; _x ctrlCommit 3; _x ctrlShow true; } forEach [_Btn1,_Btn2,_Btn3,_Btn4,_Btn5,_Btn6,_Btn7]; }; };
Ich bedanke mich schonmal im Voraus
-
Ok Thanks ich werde gleich ausprobieren
-
Ok Ich mach die ein Beispiel wenn jemand jetzt ein Kupfer erz hat dann brauch er zum verarbieten 5 sec. und wenn er 30 mal Kupfer im Inventar hat dann brauch er 2 min und 50 Sec. sowas halt
-
Hey leute wie kann ich die Verarbeitungs Geschwindigtkeit anhand der Anzahl der Item Festlegen
-
Habe alles auspobiert es funkltioniert nichts davon bzw. habe ich es an den Logischsten stellen eingesetzt
-
Macht mal bitte Vorschläge in welche Datein ich das Einfügen kann und in welcher Zeile
-
Hier mein RPT keine Fehler gefunden RPTLogs
-
Spoiler anzeigen
Code: fn_initCiv.sqf
Alles anzeigen#include "..\script_macros.hpp" /* File: fn_initCiv.sqf Author: Bryan "Tonic" Boardwine Description: Initializes the civilian. */ private _altisArray = ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"]; private _tanoaArray = ["Land_House_Small_01_F"]; private _spawnBuildings = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort; civ_spawn_1 = nearestObjects[getMarkerPos "civ_spawn_1", _spawnBuildings,350]; civ_spawn_2 = nearestObjects[getMarkerPos "civ_spawn_2", _spawnBuildings,350]; civ_spawn_3 = nearestObjects[getMarkerPos "civ_spawn_3", _spawnBuildings,350]; civ_spawn_4 = nearestObjects[getMarkerPos "civ_spawn_4", _spawnBuildings,350]; waitUntil {!(isNull (findDisplay 46))}; if (life_is_alive && !life_is_arrested) then { /* Spawn at our last position */ player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"]; } else { if (!life_is_alive && !life_is_arrested) then { if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then { _handle = [] spawn life_fnc_civLoadout; waitUntil {scriptDone _handle}; CASH = 0; [0] call SOCK_fnc_updatePartial; }; waitUntil {player getVariable ["gang_init_done", false]}; ///////////////////////////////////////////////////////// if (license_civ_Einbuergerungslizenz) then { _intro = []call life_fnc_Intro; waitUntil {scriptDone _intro}; }; ///////////////////////////////////////////////////////// [] call cat_spawn_fnc_spawnMenu; waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done. } else { if (life_is_arrested) then { life_is_arrested = false; [player,true] spawn life_fnc_jail; }; }; }; life_is_alive = true;
-
Bei der InitCiv habe ich es schon probiert da geht es nicht
-
und wo füge ich das jetzt ein bei der core init oder in der spawnconfirm oder initCiv ??
-
Also so
if (license_civ_Einbuergerungslizenz > 0) then {
_intro = []call life_fnc_Intro;
waitUntil {scriptDone _intro};
};
-
das letzte klingt doch sehr fernüftig aber wie stelle ich das jetzt am besten an ??
-
Hey leute ich wollte mal fragen wie man es machen kann wenn ein Neuling auf dem Server Joint das dann eine Intro Cam Erscheint die z.B. über ganz Altis fliegt, so wenn er das hintersich hat soll er beim nächsten Connecten das nicht mehr haben.
-
Schick mal bitte deine Server.cfg und deine Startparameter rein Danke
-
Hey Leute ich bins wieder Deathman mit einem
Kleines Erweiterungs Script für die Gather
was macht dieses Script,Mit diesen Script könnt ihr in der Config_Gather die Sounds für die Einzelnen Farming Zonen Festlegen.
Nun fangen wir aber mal an.
1. gehe in die core\actions\fn_mine.sqf
dort sucht hier nach folgenden Zeile
_requiredItem = getText(_curConfig >> "item");
und fügt darunter das hier ein
_Soundeffect = getText(_curConfig >> "Sound");
dann sucht hier die nächste Zeile
[player,"mining",35,1] remoteExecCall ["life_fnc_say3D",RCLIENT];
und erstzt diese mit dem Code
[player,_Soundeffect,35,1] remoteExecCall ["life_fnc_say3D",RCLIENT];
2. gehe in die core\actions\fn_gather.sqf
dort sucht hier nach folgenden Zeile
_requiredItem = getText(_curConfig >> "item");
und fügt darunter das hier ein
_Soundeffect = getText(_curConfig >> "Sound");
dann sucht hier die nächste Zeile
Spoiler anzeigen
und ersetzt dieses mit dem code
Spoiler anzeigen
so und als guter letzt gehen wir in die Config_Gather.hpp hier zeige ich euch nun zwei Muster Vorlage.
Spoiler anzeigen
Code: Config_Gather.hpp
Alles anzeigenclass CfgGather { class Resources { class apple { amount = 2; zones[] = { "apple_1", "apple_2", "apple_3", "apple_4" }; item = ""; Actions = "apple"; Sound = "harvest";//<---------- zoneSize = 30; }; }; class Minerals { class copper_unrefined { amount = 2; zones[] = { "copper_mine" }; item = "pickaxe"; mined[] = {"copper_unrefined"}; Actions = "copper_unrefined"; Sound = "mining";//<------- zoneSize = 30; }; };
So das wars auch schon viel spaß Damit
euer Deathman
UPDATE ZEIT DEM 27.01.2019
-
tuh einfach mal die PersoAbfrage ersetzten nochmal durch das Original aus dem TUT