Jump to content

Qaquabum

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Qaquabum

  • Rank
    On the Coast
  1. @g4borg kann man hier keine dateien anhängen ? ich hoffe das es jetzt richtig ist override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { EntityAI itemTop; EntityAI itemEnt; ItemBase itemBs; float rand; itemTop = player.FindAttachmentBySlotName("Body"); if ( itemTop ) EntityAI EquipItem(PlayerBase player, string itemClass, int amount) { EntityAI item = player.GetInventory().CreateInInventory(itemClass); item.SetHealth("","",100); if (amount > 1) { ItemBase itemBase; if ( Class.CastTo(itemBase, item ) ) itemBase.SetQuantity(amount); } return item; } { EquipItem(player, "HuntingBagpack", 1); EquipItem(player, "HuntingJacket_Summer", 1); EquipItem(player, "HunterPants_Summer", 1); EquipItem(player, "HuntingVest", 1); EquipItem(player, "CombatBoots_Green", 1); EquipItem(player, "Headtorch_Black", 1); EquipItem(player, "HuntingKnife", 1); EquipItem(player, "CZ527", 1); EquipItem(player, "Mag_CZ527_5rnd", 2); EquipItem(player, "AmmoBox_762x39_20Rnd", 1); EquipItem(player, "HuntingOptic", 1); EquipItem(player, "CZ75", 1); EquipItem(player, "Mag_CZ75_15Rnd", 2); EquipItem(player, "AmmoBox_9x19_25rnd", 1); EquipItem(player, "PistolSuppressor", 1); EquipItem(player, "ImprovisedSuppressor", 1); EquipItem(player, "Rags", 6); EquipItem(player, "Canteen", 2); EquipItem(player, "CanOpener", 1); EquipItem(player, "Battery9V", 2); EquipItem(player, "HuntingKnife", 1); } }; edit: der server startet mit den befehlen nicht also müsste ein fehler drin sein leider hab ich keine ahnung von programmieren
  2. @g4borg wenn deine funktion keine ersetzt bleibt aber das problem das man standart klamotten vom spiel bekommt ich dachte halt das der equipitem die standartklamotten ersetzt könntest du es vllt einrichten mal auf einen ts server zu kommen oder discord server oder ich komme auf einen deiner wahl
  3. @g4borg muss das " override void StartingEquipSetup(PlayerBase player, bool clothesChosen) " stehen bleiben oder wird ab der zeile dein Code verwendet also so hier oder doch anders ? override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName) { Entity playerEnt; playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player Class.CastTo(m_player, playerEnt); GetGame().SelectPlayer(identity, m_player); return m_player; } EntityAI EquipItem(PlayerBase player, string itemClass, int amount) { EntityAI item = player.GetInventory().CreateInInventory(itemClass); item.SetHealth("","",100); if (amount > 1) { ItemBase itemBase; if ( Class.CastTo(itemBase, item ) ) itemBase.SetQuantity(amount); } return item; } ... EquipItem(player, "HuntingBagpack", 1); EquipItem(player, "HuntingJacket_Summer", 1); EquipItem(player, "HunterPants_Summer", 1); EquipItem(player, "HuntingVest", 1); EquipItem(player, "CombatBoots_Green", 1); EquipItem(player, "Headtorch_Black", 1); EquipItem(player, "HuntingKnife", 1);
  4. hey g4borg can you write your lost post in german ? not the code your explanations
  5. init.c void main() { //INIT WEATHER BEFORE ECONOMY INIT------------------------ Weather weather = g_Game.GetWeather(); weather.MissionWeather(false); // false = use weather controller from Weather.c weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0); weather.GetRain().Set( 0, 0, 1); weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0); //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 { void SetRandomHealth(EntityAI itemEnt) { if ( itemEnt ) { int rndHlt = Math.RandomInt(55,100); itemEnt.SetHealth("","",rndHlt); } } override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName) { Entity playerEnt; playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player Class.CastTo(m_player, playerEnt); GetGame().SelectPlayer(identity, m_player); return m_player; } override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { EntityAI itemTop; EntityAI itemEnt; ItemBase itemBs; float rand; itemTop = player.FindAttachmentBySlotName("Body"); if ( itemTop ) { itemEnt = itemTop.GetInventory().CreateInInventory("HuntingBag"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("HuntingJacket_Summer"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("HunterPants_Summer"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("HuntingVest"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("HuntingKnife"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("CombatBoots_Black"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("Headtorch_Black"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("Battery9V"); itemBs.SetQuantity(2); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("Rag"); if ( Class.CastTo(itemBs, itemEnt ) ) itemBs.SetQuantity(6); SetRandomHealth(itemEnt); rand = Math.RandomFloatInclusive(0.0, 1.0); if ( rand < 0.01 ) itemEnt = player.GetInventory().CreateInInventory("Apple"); else if ( rand > 0.01 ) itemEnt = player.GetInventory().CreateInInventory("Pear"); else itemEnt = player.GetInventory().CreateInInventory("Plum"); SetRandomHealth(itemEnt); } } }; Mission CreateCustomMission(string path) { return new CustomMission(); } thanks for the help with the spawnpoints its seems to work
  6. Guten Tag Ich habe einen eigenen Server möchte die Startpositionen und den Startloot für alle Spieler ändern in der "cfgplayerspawnpoints" hab ich schon alle Coordinaten bis meine ausgewählten gelöscht und trotzdem spawnen wir manchmal ganz woanders wo halt keine Coordinaten hinterlegt sind (Solnichniy) die selbstausgesuchten Coordinaten (7) liegen alle zwischen Cherno und Elektro es scheint jetzt zufunktionieren danke an g4borg in der "init.c" datei hab ich den startloot geändern leider bekommen wir nicht den eingestellten loot (Hunterbackpack, Hunter Vest, Hunting Jacket, Hunter Pants usw.) könnte jemand helfen das es so funktioniert wie geplant ? Good day I have my own server want to change the starting positions and the starting slot for all players in the "cfgplayerspawnpoints" I already deleted all coordinates until my selected ones and still we sometimes spawn somewhere else where no coordinates are stored (Solnichniy) the self-selected coordinates (7) are all between Cherno and Electro its seems to working now thanks to g4borg in the "init.c" file I changed the startloot unfortunately we do not get the set loot (Hunterpack, Hunter Vest, Hunting Jacket, Hunter Pants etc.) could someone help that it work as planned?
×