ok, dann werde ich mal gucken villt kann ich auch einfach normale Banking automaten hinstellen sollte auch das Problem beheben aber danke dir für deine mühe
Beiträge von Blacknight
-
-
Code
Alles anzeigenvoid main() { //INIT ECONOMY-------------------------------------- Hive ce = CreateHive(); if ( ce ) ce.InitOffline(); //DATE RESET AFTER ECONOMY INIT------------------------- int year, month, day, hour, minute; int reset_month = 9, reset_day = 20; GetGame().GetWorld().GetDate(year, month, day, hour, minute); if ((month == reset_month) && (day < reset_day)) { GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); } else { if ((month == reset_month + 1) && (day > reset_day)) { GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); } else { if ((month < reset_month) || (month > reset_month + 1)) { GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); } } } } class CustomMission: MissionServer { //number of player in chat override void OnInit() { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 180000, true); // 30000 = 30 seconds } void NumPLayersOnServer() { ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); int numPlayers = players.Count(); for ( int i = 0; i < players.Count(); ++i ) { Man player = players.Get(i); if( player ) { string messPlayers = "Player: " + numPlayers.ToString(); Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } void SetRandomHealth(EntityAI itemEnt) { if ( itemEnt ) { float rndHlt = Math.RandomFloat( 0.45, 0.65 ); itemEnt.SetHealth01( "", "", rndHlt ); } } override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName) { Entity playerEnt; playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" ); Class.CastTo( m_player, playerEnt ); GetGame().SelectPlayer( identity, m_player ); return m_player; } override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { EntityAI itemClothing; EntityAI itemEnt; ItemBase itemBs; float rand; itemClothing = player.FindAttachmentBySlotName( "Body" ); if ( itemClothing ) { SetRandomHealth( itemClothing ); itemEnt = itemClothing.GetInventory().CreateInInventory( "BandageDressing" ); if ( Class.CastTo( itemBs, itemEnt ) ) itemBs.SetQuantity( 2 ); string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" }; int rndIndex = Math.RandomInt( 0, 4 ); itemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] ); SetRandomHealth( itemEnt ); rand = Math.RandomFloatInclusive( 0.0, 1.0 ); if ( rand < 0.35 ) itemEnt = player.GetInventory().CreateInInventory( "Apple" ); else if ( rand > 0.65 ) itemEnt = player.GetInventory().CreateInInventory( "Pear" ); else itemEnt = player.GetInventory().CreateInInventory( "Plum" ); SetRandomHealth( itemEnt ); } itemClothing = player.FindAttachmentBySlotName( "Legs" ); if ( itemClothing ) SetRandomHealth( itemClothing ); itemClothing = player.FindAttachmentBySlotName( "Feet" ); } }; Mission CreateCustomMission(string path) { return new CustomMission(); }
so müsste eigendlich stimmen, habe ich so gemacht wie du gesagt hast aber so startet mein server nicht mehr ich weiß nicht was ich da falsch mache
-
Code
Alles anzeigen[ { "version":2, "classname":"LB_ATM_Green", "position":[ 3706.759033203125, 402.9024963378906, 5986.390625 ], "orientation":[ -80.0, 0.0, 0.0 ], "robPosition":"Green Mountain", "canDepositMoney":1, "canWithdrawMoney":1, "maxRobbingDistance":5.0, "spawnChance":1.0, "canBeRobbed":0, "robbingConfig":[ { "requiredRobbingItem":"", "robbingItemDamage":50.0, "robbingTimeMinutes":15 } ], "minutesLockedAfterRobbing":10, "minutesNotRobbableAfterRobbing":60, "minutesRobberNeedsToWaitBeforeRobbingAgain":1440, "lastLockedTimestamp":0, "lastRobTime":0, "useDepositedCashToCalculateRobbedMoney":1, "cashDeposited":4708428, "depositedCashIncreasePerMin":20, "robbedDepositedCashPercent":0.10000000149011612, "maxMoneyRobbedFromDepositedMoney":20000, "staticMinRobbedCash":10000, "staticMaxRobbedCash":20000, "needCreditCard":0, "lastRobbers":[ ] }, { "version":2, "classname":"LB_ATM_Green", "position":[ 3751.105224609375, 311.91680908203127, 8913.1943359375 ], "orientation":[ -155.0, 0.0, 0.0 ], "robPosition":"Vybor Police Station", "canDepositMoney":1, "canWithdrawMoney":1, "maxRobbingDistance":5.0, "spawnChance":1.0, "canBeRobbed":1, "robbingConfig":[ { "requiredRobbingItem":"", "robbingItemDamage":50.0, "robbingTimeMinutes":15 } ], "minutesLockedAfterRobbing":10, "minutesNotRobbableAfterRobbing":60, "minutesRobberNeedsToWaitBeforeRobbingAgain":1440, "lastLockedTimestamp":0, "lastRobTime":0, "useDepositedCashToCalculateRobbedMoney":1, "cashDeposited":0, "depositedCashIncreasePerMin":20, "robbedDepositedCashPercent":0.10000000149011612, "maxMoneyRobbedFromDepositedMoney":20000, "staticMinRobbedCash":10000, "staticMaxRobbedCash":20000, "needCreditCard":0, "lastRobbers":[ ] }, { "version":2, "classname":"LB_ATM_Green", "position":[ 11486.9, 343.134, 11339.6 ], "orientation":[ -164906, -0, -0 ], "robPosition":"Klam Schwarzmark Trader", "canDepositMoney":1, "canWithdrawMoney":1, "maxRobbingDistance":5.0, "spawnChance":1.0, "canBeRobbed":1, "robbingConfig":[ { "requiredRobbingItem":"", "robbingItemDamage":50.0, "robbingTimeMinutes":15 } ], "minutesLockedAfterRobbing":10, "minutesNotRobbableAfterRobbing":60, "minutesRobberNeedsToWaitBeforeRobbingAgain":1440, "lastLockedTimestamp":0, "lastRobTime":0, "useDepositedCashToCalculateRobbedMoney":1, "cashDeposited":0, "depositedCashIncreasePerMin":20, "robbedDepositedCashPercent":0.10000000149011612, "maxMoneyRobbedFromDepositedMoney":20000, "staticMinRobbedCash":10000, "staticMaxRobbedCash":20000, "needCreditCard":0, "lastRobbers":[ ] }, { "version":2, "classname":"LB_ATM_Green", "position":[ 11477.6, 343.702, 11331.3 ], "orientation":[ 56.7164, 0, 0 ], "robPosition":"Klam Schwarzmark Trader", "canDepositMoney":1, "canWithdrawMoney":1, "maxRobbingDistance":5.0, "spawnChance":1.0, "canBeRobbed":1, "robbingConfig":[ { "requiredRobbingItem":"", "robbingItemDamage":50.0, "robbingTimeMinutes":15 } ], "minutesLockedAfterRobbing":10, "minutesNotRobbableAfterRobbing":60, "minutesRobberNeedsToWaitBeforeRobbingAgain":1440, "lastLockedTimestamp":0, "lastRobTime":0, "useDepositedCashToCalculateRobbedMoney":1, "cashDeposited":0, "depositedCashIncreasePerMin":20, "robbedDepositedCashPercent":0.10000000149011612, "maxMoneyRobbedFromDepositedMoney":20000, "staticMinRobbedCash":10000, "staticMaxRobbedCash":20000, "needCreditCard":0, "lastRobbers":[ ] }
so eingetragen aber übernimmt er trotzdem nicht ich habe über das Programm gejagt der mir sagt das alles ok ist ?!
] -
Code
Alles anzeigenvoid main() { //INIT ECONOMY-------------------------------------- Hive ce = CreateHive(); if ( ce ) ce.InitOffline(); //DATE RESET AFTER ECONOMY INIT------------------------- int year, month, day, hour, minute; int reset_month = 9, reset_day = 20; GetGame().GetWorld().GetDate(year, month, day, hour, minute); if ((month == reset_month) && (day < reset_day)) { GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); } else { if ((month == reset_month + 1) && (day > reset_day)) { GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); } else { if ((month < reset_month) (month > reset_month + 1)) { GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); } } } } class CustomMission: MissionServer { //number of player in chat override void OnInit() { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 180000, true); // 30000 = 30 seconds } void NumPLayersOnServer() { ref array players = new array; GetGame().GetPlayers( players ); int numPlayers = players.Count(); for ( int i = 0; i < players.Count(); ++i ) { Man player = players.Get(i); if( player ) { string messPlayers = "Player: " + numPlayers.ToString(); Param1 m_MessageParam = new Param1(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } } { void SetRandomHealth(EntityAI itemEnt) { if ( itemEnt ) { float rndHlt = Math.RandomFloat( 0.45, 0.65 ); itemEnt.SetHealth01( "", "", rndHlt ); } } override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName) { Entity playerEnt; playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" ); Class.CastTo( m_player, playerEnt ); GetGame().SelectPlayer( identity, m_player ); return m_player; } override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { EntityAI itemClothing; EntityAI itemEnt; ItemBase itemBs; float rand; itemClothing = player.FindAttachmentBySlotName( "Body" ); if ( itemClothing ) { SetRandomHealth( itemClothing ); itemEnt = itemClothing.GetInventory().CreateInInventory( "BandageDressing" ); if ( Class.CastTo( itemBs, itemEnt ) ) itemBs.SetQuantity( 2 ); string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" }; int rndIndex = Math.RandomInt( 0, 4 ); itemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] ); SetRandomHealth( itemEnt ); rand = Math.RandomFloatInclusive( 0.0, 1.0 ); if ( rand < 0.35 ) itemEnt = player.GetInventory().CreateInInventory( "Apple" ); else if ( rand > 0.65 ) itemEnt = player.GetInventory().CreateInInventory( "Pear" ); else itemEnt = player.GetInventory().CreateInInventory( "Plum" ); SetRandomHealth( itemEnt ); } itemClothing = player.FindAttachmentBySlotName( "Legs" ); if ( itemClothing ) SetRandomHealth( itemClothing ); itemClothing = player.FindAttachmentBySlotName( "Feet" ); } }; Mission CreateCustomMission(string path) { return new CustomMission(); }
und der cresh sagt mir,
---------------------------------------------
Log C:\SERVICES\ni482597_1_SHARE\ftproot\dayzstandalone\config\crash_2022-01-10_11-07-02.log started at 10.01. 11:07:54
------------------------------------
MS2782, 10.01 2022 11:07:54
Can't compile mission init script'!
$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c(59): Unexpected scope
-
Ich danke dir
-
Guten Morgen zusammen,
und zwar ist das Möglich sich unten in Chat anzeigen zu lassen wenn ein Spieler Joint oder wenn ein Spieler offline geht. Ich habe das mal auf ein Server gesehen das dies In Globel Chat wohl möglich ist. darüber kann man sich auch Nachrichten anzeigen lassen wie server regeln oder Server Reststart ich weiß aber nicht wo man das einstellt.
Ich benutze VPP Admin Tool
Vielen danke.
-
Guten Morgen zusammen,
Und zwar ich habe folgendes Problem, ich habe 2 Bank Automaten an den Schwarz Markt Trader hingestellt von mir erstellt, jetzt wenn ich die Bank Automaten anvesiere steht da das ich die in die ATMPositions.json eintragen soll, dies habe ich gemacht so bald ich den Server neu starte verschwindet Eintrag aus der Datei kann ich mir nicht erklären warum kennt sich eventuell damit aus ich bin Rat los
-
Guten Abend zusammen,
und zwar ich habe folgendes Problem wenn ich was aus den Base Building Plus baue auf meinen Server, tuen nach gewisser zeit die Wood Floor T1 despawnen ich kann mir das nicht erklären die Lifetime ist schon demensprechend angepasst. so steht es in der Type.xml
<type name="BBP_BedKit">
<nominal>20</nominal>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<tag name="floor"/>
<usage name="Farm"/>
<usage name="Industrial"/>
<usage name="Town"/>
<usage name="Village"/>
</type>
<type name="BBP_Bed">
<flags count_in_cargo="1" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_Bedding">
<nominal>20</nominal>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<tag name="floor"/>
<usage name="Farm"/>
<usage name="Town"/>
<usage name="Village"/>
</type>
<type name="BBP_Step_LadderKit">
<nominal>20</nominal>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<tag name="floor"/>
<usage name="Farm"/>
<usage name="Industrial"/>
<usage name="Town"/>
<usage name="Village"/>
</type>
<type name="BBP_Step_Ladder">
<flags count_in_cargo="1" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_T2_WindowKit">
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_T2_Window">
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_T3_StairKit">
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_T3_Stair">
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_Plaster">
<nominal>20</nominal>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<tag name="floor"/>
<usage name="Farm"/>
<usage name="Industrial"/>
<usage name="Town"/>
<usage name="Village"/>
<usage name="Office"/>
<usage name="School"/>
</type>
<type name="BBP_Bucket">
<nominal>20</nominal>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<tag name="floor"/>
<usage name="Farm"/>
<usage name="Industrial"/>
<usage name="Town"/>
<usage name="Village"/>
<usage name="Military"/>
</type>
<type name="BBP_WellKit">
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_Well">
<flags count_in_cargo="1" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_T1_Roof_HatchKit">
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="BBP_T1_Roof_Hatch">
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
danke für euere hilfe