Jump to content
Atnas666

Admin tools

Recommended Posts

3 hours ago, Atnas666 said:

I FIXED IT!!!! I HAVE NO IDEA WHAT I DID BUT I FIXED IT!!

how did you fix it it wont work for me just says its a broken code

Share this post


Link to post
Share on other sites
1 hour ago, mrwolv said:

how did you fix it it wont work for me just says its a broken code

i really do not know!

i just did the same thing for like the 25th time and it worked.

 

But does any one know how i can now get my spawn gear sorted now intial.c does not do this

 

 


void main()
{

    Hive ce = CreateHive();
    if ( ce )
        ce.InitOffline();

    Weather weather = g_Game.GetWeather();

    weather.GetOvercast().SetLimits( 0.0 , 1.0 );
    weather.GetRain().SetLimits( 0.0 , 1.0 );
    weather.GetFog().SetLimits( 0.0 , 0.25 );

    weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.2 );
    weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );
    weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );

    weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
    weather.GetRain().SetForecastTimeLimits( 600 , 600 );
    weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
    weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
    weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
    
    weather.SetWindMaximumSpeed(15);
    weather.SetWindFunctionParams(0.1, 0.3, 50);
}

class CustomMission: MissionServer
{    
    void SetRandomHealth(EntityAI itemEnt)
    {
        int rndHlt = Math.RandomInt(40,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)
    {
/*
        player.RemoveAllItems();

        EntityAI item = player.GetInventory().CreateInInventory(topsArray.GetRandomElement());
        EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
        EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
*/
        EntityAI itemEnt;
        ItemBase itemBs;
        
        itemEnt = player.GetInventory().CreateInInventory("Rag");
        itemBs = ItemBase.Cast(itemEnt);
        itemBs.SetQuantity(4);
        SetRandomHealth(itemEnt);

        itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
        itemBs = ItemBase.Cast(itemEnt);

        itemEnt = player.GetInventory().CreateInInventory("TaloonBag_Green");
        itemBs = ItemBase.Cast(itemEnt);

        itemEnt = player.GetInventory().CreateInInventory("SpaghettiCan");
        itemBs = ItemBase.Cast(itemEnt);

        itemEnt = player.GetInventory().CreateInInventory("HuntingKnife");
        itemBs = ItemBase.Cast(itemEnt);
    }
};
  
Mission CreateCustomMission(string path)
{
    return new CustomMission();
}

 

Quote

Share this post


Link to post
Share on other sites
16 hours ago, Violt said:

Do you put your SteamID64 or ur BattlEye UID up  Tstring array admins = ? 

and does it require to use #login adminpass or doesn't it as long as your name is in the admins list

If you are running the latest build of the Vanilla ++ mission you would enter your 64ID in admins.txt - put one ID per line without a space after the ID. Note only one person can use text commands like /heal at once. 

Yes it does require you to #login Password as well as having your ID in admins.txt

16 hours ago, wydox123 said:

https://github.com/Da0ne/DZMods?files=1

 

Will applying this to my server make players have to download a mod before joining? Or will the server still be 'vanilla' and allow anyone to join that is running the normal steam version.

No one will need to download anything. The is purely server side configuration. Please note that when steam pushes an update for DayZ it sometimes breaks this modification - then revisit his GitHub for updates accordingly. 

15 hours ago, AccidentalRob said:

That's good to know... thanks for your help. It turns out I was using an outdated / incorrect list of item class names, so I appreciate the link!

I’m glad to hear it helped - feel free to give me some beans ;) let m know if you have any issues.

14 hours ago, mrwolv said:

how do i install this to my server it just keeps giving me errors says broken expression missing  ;

Are you using the Vanilla mission ++ or the modified init.c ? 

Edited by Fester808

Share this post


Link to post
Share on other sites
5 hours ago, Atnas666 said:

I FIXED IT!!!! I HAVE NO IDEA WHAT I DID BUT I FIXED IT!!

I hope I helped in some way - feel free to share the love. I will look at your init.c later  today

  • Like 1

Share this post


Link to post
Share on other sites
24 minutes ago, Fester808 said:

If you are running the latest build of the Vanilla ++ mission you would enter your 64ID in admins.txt - put one ID per line without a space after the ID. Note only one person can use text commands like /heal at once. 

Yes it does require you to #login Password as well as having your ID in admins.txt

No one will need to download anything. The is purely server side configuration. Please note that when stems pushes an undo date for DayZ it sometimes breaks this modification - then revisit his GitHub for updates accordingly. 

I’m glad to hear it helped - feel free to give me some beans ;) let m know if you have any issues.

Are you using the Vanilla mission ++ or the modified init.c ? 

i am using my server files not the ones provided and its all working now thanks

  • Beans 1

Share this post


Link to post
Share on other sites

My basic Chat Commands Admin *test

1. Replace all init.c
https://github.com/Malotruu/DayZMalotru.chernarusplus/blob/master/init.c 

2. Edit   L - 53  *Optional spawn admin vybor
// your Steam ID

3.ingame #login yourpasse
4.ingame !heal !v3s !m4a1 ….

*I am very bad at coding just fun test work for me
command:  https://github.com/Malotruu/DayZMalotru.chernarusplus/wiki 
I delete if does not work

 

Edited by Malotru

Share this post


Link to post
Share on other sites
12 hours ago, Violt said:

Yeah, anyways quick question. Do you put your SteamID64 or ur BattlEye UID up  Tstring array admins = ? 

and does it require to use #login adminpass or doesn't it as long as your name is in the admins list

dont change the code....just past it....

login ingame and..yey have fun...

 

Share this post


Link to post
Share on other sites
12 hours ago, Atnas666 said:

But does any one know how i can now get my spawn gear sorted now intial.c does not do this

Try this (see code below) - press CTRL + A and copy the entire contents and replace it with the contents of your init.c

I have made some juicy changes. I have created 5 arrays which will randomly select one item which i have chosen (including your spaghetti and pipsi) from each of the 5 arrays (groups). These groups are Tops, Pants, Shoes, Drinks and Food. You can change the items found in the groups on line 57-61 - please use item names found here if you want to make any changes and ensure you enter them correctly or it will potentially break the script. You can also include another array if you wish such as backpacks, gloves, hats etc. but it will require you to look and understand how the two parts of the array work - the group and the call to action.

Share the love if this helped @Atnas666

 

void main()
{

	Hive ce = CreateHive();
	if ( ce )
		ce.InitOffline();

	Weather weather = g_Game.GetWeather();

	weather.GetOvercast().SetLimits( 0.0 , 1.0 );
	weather.GetRain().SetLimits( 0.0 , 1.0 );
	weather.GetFog().SetLimits( 0.0 , 0.25 );

	weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.2 );
	weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );
	weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );

	weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
	weather.GetRain().SetForecastTimeLimits( 600 , 600 );
	weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );

	weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
	weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
	weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
	
	weather.SetWindMaximumSpeed(15);
	weather.SetWindFunctionParams(0.1, 0.3, 50);
}

class CustomMission: MissionServer
{	
	void SetRandomHealth(EntityAI itemEnt)
	{
		int rndHlt = Math.RandomInt(40,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)
	{

//Fester808 Inventory Changes
		EntityAI itemEnt;
		ItemBase itemBs;

//Arrarys
		ref TStringArray topsArray = {"TShirt_Beige","TShirt_Black","TShirt_Blue","TShirt_Green","TShirt_Grey","TShirt_OrangeWhiteStripes","TShirt_Red","TShirt_RedBlackStripes","TShirt_White","Sweater_Blue","Sweater_Gray","Sweater_Green","Sweater_Red"};
		ref TStringArray pantsArray = {"Jeans_Black","Jeans_Blue","Jeans_BlueDark","Jeans_Brown","Jeans_Green","Jeans_Grey"};
		ref TStringArray shoesArray = {"AthleticShoes_Black","AthleticShoes_Blue","AthleticShoes_Brown","AthleticShoes_Green","AthleticShoes_Grey","Sneakers_Black","Sneakers_Gray","Sneakers_Green","Sneakers_Red","Sneakers_White","WorkingBoots_Beige","WorkingBoots_Brown","WorkingBoots_Green","WorkingBoots_Grey","WorkingBoots_Yellow"};
		ref TStringArray drinksArray = {"SodaCan_Spite","SodaCan_Pipsi","SodaCan_Kvass","SodaCan_Cola"};
        ref TStringArray foodArray = {"BakedBeansCan","PeachesCan","SpaghettiCan"};

	player.RemoveAllItems();

		EntityAI item = player.GetInventory().CreateInInventory(topsArray.GetRandomElement());
		EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
		EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
		EntityAI item4 = player.GetInventory().CreateInInventory(drinksArray.GetRandomElement());
        EntityAI item5 = player.GetInventory().CreateInInventory(foodArray.GetRandomElement());
        		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(4);
		SetRandomHealth(itemEnt);	
        
        itemEnt = player.GetInventory().CreateInInventory("TaloonBag_Green");
        itemBs = ItemBase.Cast(itemEnt);

        itemEnt = player.GetInventory().CreateInInventory("HuntingKnife");
        itemBs = ItemBase.Cast(itemEnt);
	}
};
  
Mission CreateCustomMission(string path)
{
	return new CustomMission();
}

 

Edited by Fester808
  • Like 1

Share this post


Link to post
Share on other sites

I can login as admin,but I put command on chatline /daytime or so it will show it as chat message.What I am doing wrong?Tested many commands,but they all shows as chat messages

 

Share this post


Link to post
Share on other sites
38 minutes ago, MacAgony said:

I can login as admin,but I put command on chatline /daytime or so it will show it as chat message.What I am doing wrong?Tested many commands,but they all shows as chat messages

Are you using the full vanilla ++ mission and followed all the instaltion steps including entering you 64ID in admins.txt? 

Share this post


Link to post
Share on other sites

It works now,my fault,I delete Admins.txt file and put my steamid there,not work.But when I added my steamid there and not delete file first it work

Share this post


Link to post
Share on other sites
3 hours ago, Fester808 said:

Try this (see code below) - press CTRL + A and copy the entire contents and replace it with the contents of your init.c

I have made some juicy changes. I have created 5 arrays which will randomly select one item which i have chosen (including your spaghetti and pipsi) from each of the 5 arrays (groups). These groups are Tops, Pants, Shoes, Drinks and Food. You can change the items found in the groups on line 57-61 - please use item names found here if you want to make any changes and ensure you enter them correctly or it will potentially break the script. You can also include another array if you wish such as backpacks, gloves, hats etc. but it will require you to look and understand how the two parts of the array work - the group and the call to action.

Share the love if this helped @Atnas666

 


void main()
{

	Hive ce = CreateHive();
	if ( ce )
		ce.InitOffline();

	Weather weather = g_Game.GetWeather();

	weather.GetOvercast().SetLimits( 0.0 , 1.0 );
	weather.GetRain().SetLimits( 0.0 , 1.0 );
	weather.GetFog().SetLimits( 0.0 , 0.25 );

	weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.2 );
	weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );
	weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );

	weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
	weather.GetRain().SetForecastTimeLimits( 600 , 600 );
	weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );

	weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
	weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
	weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
	
	weather.SetWindMaximumSpeed(15);
	weather.SetWindFunctionParams(0.1, 0.3, 50);
}

class CustomMission: MissionServer
{	
	void SetRandomHealth(EntityAI itemEnt)
	{
		int rndHlt = Math.RandomInt(40,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)
	{

//Fester808 Inventory Changes
		EntityAI itemEnt;
		ItemBase itemBs;

//Arrarys
		ref TStringArray topsArray = {"TShirt_Beige","TShirt_Black","TShirt_Blue","TShirt_Green","TShirt_Grey","TShirt_OrangeWhiteStripes","TShirt_Red","TShirt_RedBlackStripes","TShirt_White","Sweater_Blue","Sweater_Gray","Sweater_Green","Sweater_Red"};
		ref TStringArray pantsArray = {"Jeans_Black","Jeans_Blue","Jeans_BlueDark","Jeans_Brown","Jeans_Green","Jeans_Grey"};
		ref TStringArray shoesArray = {"AthleticShoes_Black","AthleticShoes_Blue","AthleticShoes_Brown","AthleticShoes_Green","AthleticShoes_Grey","Sneakers_Black","Sneakers_Gray","Sneakers_Green","Sneakers_Red","Sneakers_White","WorkingBoots_Beige","WorkingBoots_Brown","WorkingBoots_Green","WorkingBoots_Grey","WorkingBoots_Yellow"};
		ref TStringArray drinksArray = {"SodaCan_Spite","SodaCan_Pipsi","SodaCan_Kvass","SodaCan_Cola"};
        ref TStringArray foodArray = {"BakedBeansCan","PeachesCan","SpaghettiCan"};

	player.RemoveAllItems();

		EntityAI item = player.GetInventory().CreateInInventory(topsArray.GetRandomElement());
		EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
		EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
		EntityAI item4 = player.GetInventory().CreateInInventory(drinksArray.GetRandomElement());
        EntityAI item5 = player.GetInventory().CreateInInventory(foodArray.GetRandomElement());
        		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(4);
		SetRandomHealth(itemEnt);	
        
        itemEnt = player.GetInventory().CreateInInventory("TaloonBag_Green");
        itemBs = ItemBase.Cast(itemEnt);

        itemEnt = player.GetInventory().CreateInInventory("HuntingKnife");
        itemBs = ItemBase.Cast(itemEnt);
	}
};
  
Mission CreateCustomMission(string path)
{
	return new CustomMission();
}

 

Thanks. I got working by doing it this way

#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\ModuleManager.c"
#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\Tunables.c"
#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\Modules\\AdminTool\\AdminTool.c"
#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\Modules\\AdvancedLoadouts\\AdvancedLoadouts.c"
#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\Modules\\Misc\\BuildingSpawner.c"
#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\Modules\\SafeZone\\SafeZoneFunctions.c"
#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\Modules\\ServerEvents\\InfectedHordes.c"

//#include "$CurrentDir:\\mpmissions\\DayZSurvival.chernarusplus\\ScriptedMods\\Modules\\Misc\\MOTDMessages.c"

class DayZSurvival : MissionServer
{
    private ref set<ref ModuleManager> m_Modules;
    ref InfectedHordes m_ZombieEvents;
    protected float m_LogInTimerLength = 1;     //in seconds the spawn timer when players login!
    bool m_StaminaStatus = false;

    void DayZSurvival()
    {
        Print("VANILLA PLUS PLUS IS ALIVE!!");
        m_Modules = new set<ref ModuleManager>;
        RegisterModules();
    }
    
    void ~DayZSurvival()
    {
        
    }
    
    void RegisterModules()
    {
        m_Modules.Insert(new ModTunables(this));
        
        if (ModTunables.Cast(GetModule(ModTunables)).IsActive("AdminTools"))
        {
            m_Modules.Insert(new AdminTool(this));
        }

        if (ModTunables.Cast(GetModule(ModTunables)).IsActive("AdvancedLoadouts"))
        {
            m_Modules.Insert(new AdvancedLoadouts(this));
        }

        if (ModTunables.Cast(GetModule(ModTunables)).IsActive("SafeZone"))
        {
            m_Modules.Insert(new SafeZone(this));
        }
    }
    
    void InitModules()
    {
        for ( int i = 0; i < m_Modules.Count(); ++i)
        {
            m_Modules.Get(i).Init();
        }
    }
    
    ModuleManager GetModule(typename moduleType)
    {
        for ( int i = 0; i < m_Modules.Count(); ++i)
        {
            ModuleManager module = m_Modules.Get(i);
            if (module.GetModuleType() == moduleType) 
            {
                return module;
            }
        }
        return NULL;
    }
    
    
    override void OnInit()
    {
        super.OnInit();
        InitModules();
        
        if (!ModTunables.Cast(GetModule(ModTunables)).IsActiveMisc("Debugmode"))
        {
            Hive ce = CreateHive();
            if (ce)
            ce.InitOffline();
        }

        if (ModTunables.Cast(GetModule(ModTunables)).IsActiveMisc("ProxyExportMode"))
        {
            CETesting TestHive = GetTesting();
            TestHive.ExportProxyProto();
            TestHive.ExportProxyData( "7500 0 7500", 15000 );
        }

        if (ModTunables.Cast(GetModule(ModTunables)).IsActiveMisc("SessionFeed"))
        {
            g_Game.SetProfileString("SessionFeed", "true");
        }
        else
        {
            g_Game.SetProfileString("SessionFeed", "false");
        }

        if (ModTunables.Cast(GetModule(ModTunables)).IsActiveMisc("CustomBuildings"))
        {
            ref BuildingSpawner bldspnwer = new BuildingSpawner;
            bldspnwer.Init();
        }

        if (ModTunables.Cast(GetModule(ModTunables)).IsActiveMisc("StaminaStatus"))
        {
            m_StaminaStatus = true; //Disable Stamina
        }
        
        if (ModTunables.Cast(GetModule(ModTunables)).IsActive("InfectedHordes"))
        {
            m_ZombieEvents = new InfectedHordes;
        }
        
        //-----------
        GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(this.PlayerCounter, 110000, true);  //Default 120000 2 mins Looped
        //GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(this.CustomMOTD, TIME_INTERVAL, true);  //Default 120000 2 mins Looped
        //-----------
    }

    override void OnPreloadEvent(PlayerIdentity identity, out bool useDB, out vector pos, out float yaw, out int queueTime)
    {
        if (GetHive())
        {
            useDB = true;
            queueTime = m_LogInTimerLength;
        }
        else
        {
            useDB = false;
            pos = "7500 0 7500";
            yaw = 0;
            queueTime = m_LogInTimerLength;
        }
    }

    override void TickScheduler(float timeslice)
    {
        GetGame().GetWorld().GetPlayerList(m_Players);
        if( m_Players.Count() == 0 ) return;
        for(int i = 0; i < SCHEDULER_PLAYERS_PER_TICK; i++)
        {
            if(m_currentPlayer >= m_Players.Count() )
            {
                m_currentPlayer = 0;
            }

            PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(m_currentPlayer));
            currentPlayer.OnTick();

            if (m_StaminaStatus) {
            currentPlayer.GetStaminaHandler().SyncStamina(1000,1000);
            currentPlayer.GetStatStamina().Set(currentPlayer.GetStaminaHandler().GetStaminaCap());
            }
            if (GetModule(SafeZone)) { SafeZone.Cast(GetModule(SafeZone)).SafeZoneHandle(currentPlayer); }
            m_currentPlayer++;
        }
    }

    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 OnEvent(EventType eventTypeId, Param params) 
    {
        super.OnEvent(eventTypeId,params);
        
        switch(eventTypeId)
        {
            case ChatMessageEventTypeID:
                 ChatMessageEventParams chat_params = ChatMessageEventParams.Cast(params);
                 if (chat_params.param1 == 0 && chat_params.param2 != "") //trigger only when channel is Global == 0 and Player Name does not equal to null
                    {
                        Param4<int,string,string,string> request_info = new Param4<int,string,string,string>(chat_params.param1, chat_params.param2, chat_params.param3, chat_params.param4);
                        AdminTool.Cast(GetModule(AdminTool)).RequestHandler(request_info); //Send the param to Admintools
                    }
            break;
        }
    }
    
    void GlobalMessage(int Channel, string Message)
    {
        if (Message != "")
        {
            GetGame().ChatPlayer(Channel,Message);
        }
    }

    void PlayerCounter()
    {
        array<Man> players = new array<Man>;
        GetGame().GetPlayers( players );
        int numbOfplayers = players.Count();
        GlobalMessage(1,"Online Players: "+ numbOfplayers.ToString());
    }
    
    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
    {
        ItemBase itemBs;
        EntityAI itemEnt;
        
        if (GetModule(AdvancedLoadouts))
        {
            if (AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).CheckTunables("StaticLoadouts"))
            {
                bool reqld = AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).LoadRandomStaticLD(player);
            }
            else if (AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).CheckTunables("RandomizedLoadouts"))
            {
                AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).LoadRndGenLoadout(player);
            }
            else
            {
                //Vanilla
                itemEnt = player.GetInventory().CreateInInventory("Rag");
                itemBs = ItemBase.Cast(itemEnt);
                itemBs.SetQuantity(4);

                itemEnt = player.GetInventory().CreateInInventory("WaterBottle");
                itemBs = ItemBase.Cast(itemEnt);

                itemEnt = player.GetInventory().CreateInInventory("TaloonBag_Green");
                itemBs = ItemBase.Cast(itemEnt);

                itemEnt = player.GetInventory().CreateInInventory("SpaghettiCan");
                itemBs = ItemBase.Cast(itemEnt);

                itemEnt = player.GetInventory().CreateInInventory("HuntingKnife");
                itemBs = ItemBase.Cast(itemEnt);
            }

            if (AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).CheckTunables("SpawnArmed"))
            {
                //Gun spawner Handle
                //SpawnGunIn( PlayerBase player, string ClassName, bool isPrimary, TstringArray Attachments, TstringArray Extras) NOTE: Set bool to 'true' IF weapon was primary
                int oRandValue = Math.RandomIntInclusive(0,2);
                switch(oRandValue.ToString())
                {
                    case "0":
                    AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).SpawnGunIn( player , "fnx45", true, {"fnp45_mrdsoptic","PistolSuppressor"},{"mag_fnx45_15rnd","mag_fnx45_15rnd"} );
                    break;

                    case "1":
                    AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).SpawnGunIn( player , "CZ75", true, {"PistolSuppressor"} , {"Mag_CZ75_15Rnd","Mag_CZ75_15Rnd"} );
                    break;

                    case "2":
                    AdvancedLoadouts.Cast(GetModule(AdvancedLoadouts)).SpawnGunIn( player , "makarovij70", true, {"PistolSuppressor"} , {"mag_ij70_8rnd","mag_ij70_8rnd"} );
                    break;
                }
            }
        }
        else
        {
            //Vanilla
            itemEnt = player.GetInventory().CreateInInventory("Rag");
            itemBs = ItemBase.Cast(itemEnt);
            itemBs.SetQuantity(4);

            itemEnt = player.GetInventory().CreateInInventory("WaterBottle");
            itemBs = ItemBase.Cast(itemEnt);

            itemEnt = player.GetInventory().CreateInInventory("TaloonBag_Green");
            itemBs = ItemBase.Cast(itemEnt);

            itemEnt = player.GetInventory().CreateInInventory("SpaghettiCan");
            itemBs = ItemBase.Cast(itemEnt);

            itemEnt = player.GetInventory().CreateInInventory("HuntingKnife");
            itemBs = ItemBase.Cast(itemEnt);
        }    
    }
}

Share this post


Link to post
Share on other sites

in the E:\server\Dayzserver\mpmissions\DayZSurvival.chernarusplus\ScriptedMods\Modules\ServerMission DayZSurvival.c

  • Like 1

Share this post


Link to post
Share on other sites

 

i would like to add several admins by steam id how does that work? Thanks for your help

Share this post


Link to post
Share on other sites
10 hours ago, MacAgony said:

Cans spawned empty.Soda cans and gasoline.How I can spawn them full?

I am aware of this issue and so is the author, not sure if this is the script or the itemNames - haven't played around with other variants.

Try /spg CanisterGasolineFull or /spg canistergasoline and /spg SodaCan_PipsiFull ?

Otherwise can try /spg land_misc_well_pump_blue that will hopefully spawn a water well then can drink from that. Also try /spg Land_FuelStation_Feed that will hopefully spawn a fuel pump - then would obviously need a jerry can to fill /spg CanisterGasoline 

The two 'buildings' (water well and fuel station) would not be persistent and disappear after restart) Let me know if that works - have not tested

5 hours ago, Schmod said:

i would like to add several admins by steam id how does that work? Thanks for your help

go to admins.txt and enter an 64ID on each line - do not have any spaces after each ID (see example below). Note only one admin can use the chat based commands at once. You would need to #logoff , then they would need to #logon Password for them to get permissions.

123456789
987654321
123456789

 

11 hours ago, eh chaser said:

Any chance you can hide the commands from all other players?

Unfortunately this is unavoidable at this stage. I believe the author is developing a client side modification for his next iteration which will be released in the Workshop - hopefully this will be configured in a way to prevent these functions sent as a global message

Edited by Fester808

Share this post


Link to post
Share on other sites

Hey guys

I'm getting the following error when starting my server

!!! File "$CurrentDir:mpmissions\DayZSurvival.chernarusplus\init.c" does not exist.

I followed the instructions but obviously I've done something wrong. Any ideas?

 

Share this post


Link to post
Share on other sites
12 minutes ago, MaineRoad said:

Hey guys

I'm getting the following error when starting my server

!!! File "$CurrentDir:mpmissions\DayZSurvival.chernarusplus\init.c" does not exist.

I followed the instructions but obviously I've done something wrong. Any ideas?

Go back to the zip file you downloaded on the GitHub then go to mpmissions\DayZSurvival.chernarusplus\init.c 

You are missing that init.c file. Go to your server files then mpmissions\DayZSurvival.chernarusplus\

Now place the init.c from the zip into the DayZSurvival.chernarusplus directory of your server. 

Although if this init.c is missing you may have forgotten to move the entire DayZSurvival.chernarusplus folder from the zip in to your mpmissions folder. 

Share this post


Link to post
Share on other sites
54 minutes ago, Fester808 said:

Go back to the zip file you downloaded on the GitHub then go to mpmissions\DayZSurvival.chernarusplus\init.c 

You are missing that init.c file. Go to your server files then mpmissions\DayZSurvival.chernarusplus\

Now place the init.c from the zip into the DayZSurvival.chernarusplus directory of your server. 

Although if this init.c is missing you may have forgotten to move the entire DayZSurvival.chernarusplus folder from the zip in to your mpmissions folder. 

Cheers mate. Seems to be working now. Don't know how I lost that init.c

 

Share this post


Link to post
Share on other sites
On 12/11/2018 at 8:57 AM, Fun Automat said:

https://github.com/cf-tools/omega-scripts/blob/master/admcmd.c

https://imgur.com/a/CkjnlmV

 

Ingame....  open the chat   #login YOURPASS after this u can spawn a car with  /offroad   or spawn items with /spawn Apple or teleport to a player  /goto Survivor...

 

 

How do you do that chat commands without sending the message to global or proximity channel?

Share this post


Link to post
Share on other sites
10 hours ago, inoxvil said:

How do you do that chat commands without sending the message to global or proximity channel?

why u should hide this ?

Share this post


Link to post
Share on other sites
On 11/13/2018 at 5:28 PM, Malotru said:

My basic Chat Commands Admin *test

1. Replace all init.c
https://github.com/Malotruu/DayZMalotru.chernarusplus/blob/master/init.c 

2. Edit   L - 53  *Optional spawn admin vybor
// your Steam ID

3.ingame #login yourpasse
4.ingame !heal !v3s !m4a1 ….

*I am very bad at coding just fun test work for me
command:  https://github.com/Malotruu/DayZMalotru.chernarusplus/wiki 
I delete if does not work

 

I like it, nice job. Can you stop commands from going out on Global chat though?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×