Posts by Surviv0r1969

Nitrado now has an official Discord server to bring communities, friends and other gamers together!
Join the Nitrado Community Discord now and share your experiences and knowledge with others!

Click here to go to the Discord Server!

    Thank you so much that did it m8, so appreciated

    this is what i got now but cant seem to find server after restart once text added.... is something wrong??


    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 )

    {

    float rndHlt = Math.RandomFloat( 0.25, 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( "Rag" );

    if ( Class.CastTo( itemBs, itemEnt ) )

    itemBs.SetQuantity( 4 );


    SetRandomHealth( itemEnt );


    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 );

    }


    player.GetInventory().CreateInInventory("AliceBag_Black");

    player.GetInventory().CreateInInventory("Compass");

    player.GetInventory().CreateInInventory("Canteen");

    player.GetInventory().CreateInInventory("SardinesCan");

    player.GetInventory().CreateInInventory("CombatKnife");

    player.GetInventory().CreateInInventory("MilitaryBelt");

    player.GetInventory().CreateInInventory("NylonKnifeSheath");

    player.GetInventory().CreateInInventory("PlateCarrierHolster");

    player.GetInventory().CreateInInventory("PistolSuppressor");

    player.GetInventory().CreateInInventory("CanOpener");

    player.GetInventory().CreateInInventory("M4A1");

    player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");

    player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");

    player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");

    player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");

    player.GetInventory().CreateInInventory("Glock19");

    player.GetInventory().CreateInInventory("Mag_Glock_15Rnd");

    player.GetInventory().CreateInInventory("Mag_Glock_15Rnd");

    player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");

    player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");

    player.GetInventory().CreateInInventory("BandageDressing");

    player.GetInventory().CreateInInventory("WoodAxe");

    player.GetInventory().CreateInInventory("SodaCan_Pipsi");

    player.GetInventory().CreateInInventory("SodaCan_Spite");

    player.GetInventory().CreateInInventory("TacticalBaconCan");

    player.GetInventory().CreateInInventory("Matchbox");

    player.GetInventory().CreateInInventory("WeaponCleaningKit");

    }

    };


    Mission CreateCustomMission(string path)

    {

    return new CustomMission();

    }

    Thank you so much exactly what I was looki g for, a coupke of edits and I'm good to go, thank you kind sir

    Can anyone help please


    Hi guys, I have seen a program called dayz loadout generator, but can't find it anywhere....


    On my server I want players to spawn with a random gun from pistols to military rifles with ammo, mags and bullets, silencers, scopes , a random backpack, few bits of food, canteen, all the tablets like water purify, antibiotics, vitamins etc, bandages,. The rest they can find but can defend themselves upon spawning.


    Can anyone help as I don't have a clue what to type in the init. C file. Which is why I wanted the generator as does it for you.


    making my server pvp in most area with just one safe zone. Just wanna give players a chance to defend themselves upon spawning.... Server is ready to go and all working great apart from the load out.


    If you know where to get the file, or the text I need to copy and paste in the file I'd be so thankful of any help.


    Thanks in advance

    please help,


    i have added the mod names in the server settings seperated by a ;


    i have uploaded the mods to the server


    started the server


    but each time i try to join it says


    "client contains pbo which is not part of server data" then lists a mod name


    even if i remove the mod it just says the same but a different mod name.


    all mods have a key and have checked them all, please help


    many thanks

    sorry prob had this so many times, do i just need to add the mod id to server? or do i need to upload the mods too? if need to upload them what folder do i upload them to as cant see a mod folder?


    and if you know how to set the day to 4 hours and night to 30 mins that would be awesome


    please help and thank you in advance


    steve :)