Jump to content
mrwolv

Admin For Dayz Standalone (Works)

Recommended Posts

here is a fullly working admin script! thank to CaptHero for the help fixing this with me

just paste in your init.c below 

class CustomMission: MissionServer
{    

add your steam id in the section this is your steamID64 if you need to find your id go here https://steamid.io/

ref TStringArray admins = {"HERE"}; // Add your steamID64

no need to mod or anything just simple copy and paste

then in game login with your admin password  (#login password ingame) only 1 person can be logged in a 1 time and the commands are

/here playername  /You have been teleported to admin

/spawn itemname

/offroad  (or /spawn offroadhatchback some item names need to be full item names these can be found here https://docs.google.com/spreadsheets/d/1jFQOkaU6kSZJFzMV4NHHgmi95htJzS0_1iM8aCWYCvI/edit#gid=0)

/goto playername  

/kill playername

/heal playername  

/allgoto playername  /You teleported everyone to that player

/allhere   /all have been teleported to admin

/time    /You have set the servertime to (/time [hour] [minute])

bool verify_admins = false; // true=verify presence of BI UID in admin list
    string cmd_prefix = "/"; // Must be special character
    ref TStringArray admins = {"STEAMIDHERE"}; // Add your STEAM64 ID
 
    bool IsPlayerAnAdmin(PlayerBase player) {
        bool found = false;
        for ( int i = 0; i < admins.Count(); ++i ) {
            if(player.GetIdentity().GetId() == admins[i]) { found=true; break; }
        }
        return found;
    }
 
    void SendMessageToPlayer(PlayerBase player, string message) {
        Param1<string> param = new Param1<string>( message );
        GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, param, true, player.GetIdentity());
    }
 
    bool IsPlayer(string name) {
        PlayerBase p;
        array<Man> players = new array<Man>; GetGame().GetPlayers(players);
        for ( int i = 0; i < players.Count(); ++i ) {
            p = players.Get(i);
            if(p.GetIdentity().GetName() == name) return true;
        }
        return false;
    }
 
    PlayerBase GetPlayer(string name) {
        PlayerBase p;
        array<Man> players = new array<Man>; GetGame().GetPlayers(players);
        for ( int i = 0; i < players.Count(); ++i ) {
            p = players.Get(i);
            if(p.GetIdentity().GetName() == name) return p;
        }
        return NULL;
    }
 
    override void OnEvent(EventType eventTypeId, Param params)  
   
    {
        super.OnEvent(eventTypeId,params);
        int i;
        PlayerBase player, temp_player;
        array<Man> players = new array<Man>; GetGame().GetPlayers(players);
        if(eventTypeId != ChatMessageEventTypeID) return; // Is chat message
        ChatMessageEventParams chat_params = ChatMessageEventParams.Cast( params );
        if(chat_params.param1 != 0 || chat_params.param2 == "") return;
        player = GetPlayer(chat_params.param2);
        if(player == NULL) return;
        if(verify_admins && !IsPlayerAnAdmin(player)) { GetGame().AdminLog("[ADMCMD] (Unauthorized) " + player.GetIdentity().GetName() +" ("+player.GetIdentity().GetPlainId()+", "+player.GetIdentity().GetId()+") tried to execute "+ chat_params.param3); return; }
        string message = chat_params.param3, prefix, param0, command;
        TStringArray tokens = new TStringArray;
        message.Split(" ", tokens); int count = tokens.Count();
        param0 = tokens.Get(0);
        param0.ParseStringEx(prefix); if(prefix != cmd_prefix) return;
        param0.ParseStringEx(command);
        GetGame().AdminLog("[ADMCMD] PLAYER: "+ player.GetIdentity().GetName() +" ("+player.GetIdentity().GetPlainId()+", "+player.GetIdentity().GetId()+") CMD: "+ command);
        switch(command) {
            case "spawn": {
                if(count != 2) { SendMessageToPlayer(player, "/spawn [object]"); return; }
                GetGame().CreateObject(tokens[1], player.GetPosition(), false, true );
                SendMessageToPlayer(player, "[ObjectSpawn] Object spawned: " + tokens[1]);
                break;
            }
 
            case "goto": {
                if(count != 2) { SendMessageToPlayer(player, "/goto [player]"); return; }
                temp_player = GetPlayer(tokens[1]);
                if(temp_player == NULL) {
                    SendMessageToPlayer(player, "[Teleport] Can't find player called: '"+tokens[1]+"'");
                } else {
                    player.SetPosition(temp_player.GetPosition());
                    SendMessageToPlayer(player, "[Teleport] You teleported to " + temp_player.GetIdentity().GetName());
                }
                break;
            }
 
            case "allgoto": {
                PlayerBase allgoto_target;
                if(count != 2) { SendMessageToPlayer(player, "/allgoto [player]"); return; }
                allgoto_target = GetPlayer(tokens[1]);
                if(allgoto_target == NULL) {
                    SendMessageToPlayer(player, "[Teleport] Can't find player called: '"+tokens[1]+"'");
                } else {
                    SendMessageToPlayer(player, "[Teleport] You teleported everyone to your location");
                    for (i = 0; i < players.Count(); i++) {
                        temp_player = players.Get(i);
                        SendMessageToPlayer(temp_player, "[Teleport] You have been teleported to player " + allgoto_target.GetIdentity().GetName());
                        temp_player.SetPosition(allgoto_target.GetPosition());
                    }
                }
                break;
            }
 
            case "here": {
                if(count != 2) { SendMessageToPlayer(player, "/here [player]"); return; }
                temp_player = GetPlayer(tokens[1]);
                if(temp_player == NULL) {
                    SendMessageToPlayer(player, "[Teleport] Can't find player called: '"+tokens[1]+"'");
                } else {
                    temp_player.SetPosition(player.GetPosition());
                    SendMessageToPlayer(temp_player, "[Teleport] You have been teleported to admin " + player.GetIdentity().GetName());
                    SendMessageToPlayer(player, "[Teleport] You teleported " + temp_player.GetIdentity().GetName() + " to your location");
                }
                break;
            }
 
            case "allhere": {
                SendMessageToPlayer(player, "[Teleport] You teleported everyone to your location");
                for (i = 0; i < players.Count(); i++) {
                    temp_player = players.Get(i);
                    SendMessageToPlayer(temp_player, "[Teleport] You have been teleported to admin " + player.GetIdentity().GetName());
                    temp_player.SetPosition(player.GetPosition());
                }
                break;
            }
 
            case "time": {
                if(count != 3) { SendMessageToPlayer(player, "/time [hour] [minute]"); return; }
                GetGame().GetWorld().SetDate( 2018, 1, 7, tokens[1].ToInt(), tokens[2].ToInt());
                SendMessageToPlayer(player, "[Servertime] You have set the servertime to " + tokens[1] + ":"+tokens[2]);
                break;
            }
 
            case "kill": {
                if(count == 2) {
                    temp_player = GetPlayer(tokens[1]);
                    if(temp_player == NULL) {
                        SendMessageToPlayer(player, "[Kill] Can't find player called: '"+tokens[1]+"'");
                    } else {
                        temp_player.SetHealth(0);
                        SendMessageToPlayer(player, "[Kill] You killed " + temp_player.GetIdentity().GetName());
                    }
                } else {
                    player.SetHealth(0);
                    SendMessageToPlayer(player, "[Kill] You killed yourself");
                }
                break;
            }
 
            case "killall": {
                SendMessageToPlayer(player, "[Kill] You killed everyone");
                for (i = 0; i < players.Count(); i++) {
                    temp_player = players.Get(i);
                    if(temp_player.GetIdentity().GetId() == player.GetIdentity().GetId()) continue;
                    temp_player.SetHealth(0);
                }
                break;
            }
 
            case "heal": {
                PlayerBase heal_target;
                if(count == 2) {
                    heal_target = GetPlayer(tokens[1]);
                    if(heal_target == NULL) {
                        SendMessageToPlayer(player, "[Heal] Can't find player called: '"+tokens[1]+"'");
                    } else {
                        SendMessageToPlayer(player, "[Heal] You healed " + heal_target.GetIdentity().GetName());
                    }
                } else {
                    heal_target = player;
                    SendMessageToPlayer(player, "[Heal] You healed yourself");
                }
                if(heal_target != NULL) {
                    heal_target.SetHealth(heal_target.GetMaxHealth("", ""));
                    heal_target.SetHealth("", "Blood", heal_target.GetMaxHealth("", "Blood"));
                    heal_target.GetStatStamina().Set(1000);
                    heal_target.GetStatEnergy().Set(1000);
                    heal_target.GetStatWater().Set(1000);
                }
                break;
            }
 
            case "offroad": {
                SendMessageToPlayer(player, "[Offroad] Vehicled spawned");
                EntityAI v;
                v = GetGame().CreateObject( "OffroadHatchback", player.GetPosition() + "1.5 0 1.5");          
                v.GetInventory().CreateAttachment("SparkPlug");
                v.GetInventory().CreateAttachment("EngineBelt");
                v.GetInventory().CreateAttachment("CarBattery");
                v.GetInventory().CreateAttachment("HatchbackHood");
                v.GetInventory().CreateAttachment("HatchbackTrunk");
                v.GetInventory().CreateAttachment("HatchbackDoors_CoDriver");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel"); // spare
                break;
            }
           
            default: {
                SendMessageToPlayer(player, "Unknown command: " + command);
                break;
            }
        }
    }

 

Edited by mrwolv
  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Hello, how to teleport when the survivors have a number ??

Example : /goto Survivor (5) Doesn't work

Edited by patoche62500

Share this post


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

And thats the upstream version of it. 

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

ahh yes forgot to add that aswell thanks but that version is broken and dont work :D but with the version i posted you only need to edit the inti.c nothing else

Edited by mrwolv

Share this post


Link to post
Share on other sites
53 minutes ago, mrwolv said:

ahh yes forgot to add that aswell thanks but that version is broken and dont work :D but with the version i posted you only need to edit the inti.c nothing else

Version is working and you only need to edit the init.c anyway.

Share this post


Link to post
Share on other sites

So can i ask what i have done wrong here.. as it will not laun

bool verify_admins = false; // true=verify presence of BI UID in admin list
    string cmd_prefix = "/"; // Must be special character
    ref TStringArray admins = {"STEAMIDHERE"}; // Add your STEAM64 ID
 
    bool IsPlayerAnAdmin(PlayerBase player) {
        bool found = false;
        for ( int i = 0; i < admins.Count(); ++i ) {
            if(player.GetIdentity().GetId() == admins) { found=true; break; }
        }
        return found;
    }
 
    void SendMessageToPlayer(PlayerBase player, string message) {
        Param1<string> param = new Param1<string>( message );
        GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, param, true, player.GetIdentity());
    }
 
    bool IsPlayer(string name) {
        PlayerBase p;
        array<Man> players = new array<Man>; GetGame().GetPlayers(players);
        for ( int i = 0; i < players.Count(); ++i ) {
            p = players.Get(i);
            if(p.GetIdentity().GetName() == name) return true;
        }
        return false;
    }
 
    PlayerBase GetPlayer(string name) {
        PlayerBase p;
        array<Man> players = new array<Man>; GetGame().GetPlayers(players);
        for ( int i = 0; i < players.Count(); ++i ) {
            p = players.Get(i);
            if(p.GetIdentity().GetName() == name) return p;
        }
        return NULL;
    }
 
    override void OnEvent(EventType eventTypeId, Param params)  
   
    {
        super.OnEvent(eventTypeId,params);
        int i;
        PlayerBase player, temp_player;
        array<Man> players = new array<Man>; GetGame().GetPlayers(players);
        if(eventTypeId != ChatMessageEventTypeID) return; // Is chat message
        ChatMessageEventParams chat_params = ChatMessageEventParams.Cast( params );
        if(chat_params.param1 != 0 || chat_params.param2 == "") return;
        player = GetPlayer(chat_params.param2);
        if(player == NULL) return;
        if(verify_admins && !IsPlayerAnAdmin(player)) { GetGame().AdminLog("[ADMCMD] (Unauthorized) " + player.GetIdentity().GetName() +" ("+player.GetIdentity().GetPlainId()+", "+player.GetIdentity().GetId()+") tried to execute "+ chat_params.param3); return; }
        string message = chat_params.param3, prefix, param0, command;
        TStringArray tokens = new TStringArray;
        message.Split(" ", tokens); int count = tokens.Count();
        param0 = tokens.Get(0);
        param0.ParseStringEx(prefix); if(prefix != cmd_prefix) return;
        param0.ParseStringEx(command);
        GetGame().AdminLog("[ADMCMD] PLAYER: "+ player.GetIdentity().GetName() +" ("+player.GetIdentity().GetPlainId()+", "+player.GetIdentity().GetId()+") CMD: "+ command);
        switch(command) {
            case "spawn": {
                if(count != 2) { SendMessageToPlayer(player, "/spawn [object]"); return; }
                GetGame().CreateObject(tokens[1], player.GetPosition(), false, true );
                SendMessageToPlayer(player, "[ObjectSpawn] Object spawned: " + tokens[1]);
                break;
            }
 
            case "goto": {
                if(count != 2) { SendMessageToPlayer(player, "/goto [player]"); return; }
                temp_player = GetPlayer(tokens[1]);
                if(temp_player == NULL) {
                    SendMessageToPlayer(player, "[Teleport] Can't find player called: '"+tokens[1]+"'");
                } else {
                    player.SetPosition(temp_player.GetPosition());
                    SendMessageToPlayer(player, "[Teleport] You teleported to " + temp_player.GetIdentity().GetName());
                }
                break;
            }
 
            case "allgoto": {
                PlayerBase allgoto_target;
                if(count != 2) { SendMessageToPlayer(player, "/allgoto [player]"); return; }
                allgoto_target = GetPlayer(tokens[1]);
                if(allgoto_target == NULL) {
                    SendMessageToPlayer(player, "[Teleport] Can't find player called: '"+tokens[1]+"'");
                } else {
                    SendMessageToPlayer(player, "[Teleport] You teleported everyone to your location");
                    for (i = 0; i < players.Count(); i++) {
                        temp_player = players.Get(i);
                        SendMessageToPlayer(temp_player, "[Teleport] You have been teleported to player " + allgoto_target.GetIdentity().GetName());
                        temp_player.SetPosition(allgoto_target.GetPosition());
                    }
                }
                break;
            }
 
            case "here": {
                if(count != 2) { SendMessageToPlayer(player, "/here [player]"); return; }
                temp_player = GetPlayer(tokens[1]);
                if(temp_player == NULL) {
                    SendMessageToPlayer(player, "[Teleport] Can't find player called: '"+tokens[1]+"'");
                } else {
                    temp_player.SetPosition(player.GetPosition());
                    SendMessageToPlayer(temp_player, "[Teleport] You have been teleported to admin " + player.GetIdentity().GetName());
                    SendMessageToPlayer(player, "[Teleport] You teleported " + temp_player.GetIdentity().GetName() + " to your location");
                }
                break;
            }
 
            case "allhere": {
                SendMessageToPlayer(player, "[Teleport] You teleported everyone to your location");
                for (i = 0; i < players.Count(); i++) {
                    temp_player = players.Get(i);
                    SendMessageToPlayer(temp_player, "[Teleport] You have been teleported to admin " + player.GetIdentity().GetName());
                    temp_player.SetPosition(player.GetPosition());
                }
                break;
            }
 
            case "time": {
                if(count != 3) { SendMessageToPlayer(player, "/time [hour] [minute]"); return; }
                GetGame().GetWorld().SetDate( 2018, 1, 7, tokens[1].ToInt(), tokens[2].ToInt());
                SendMessageToPlayer(player, "[Servertime] You have set the servertime to " + tokens[1] + ":"+tokens[2]);
                break;
            }
 
            case "kill": {
                if(count == 2) {
                    temp_player = GetPlayer(tokens[1]);
                    if(temp_player == NULL) {
                        SendMessageToPlayer(player, "[Kill] Can't find player called: '"+tokens[1]+"'");
                    } else {
                        temp_player.SetHealth(0);
                        SendMessageToPlayer(player, "[Kill] You killed " + temp_player.GetIdentity().GetName());
                    }
                } else {
                    player.SetHealth(0);
                    SendMessageToPlayer(player, "[Kill] You killed yourself");
                }
                break;
            }
 
            case "killall": {
                SendMessageToPlayer(player, "[Kill] You killed everyone");
                for (i = 0; i < players.Count(); i++) {
                    temp_player = players.Get(i);
                    if(temp_player.GetIdentity().GetId() == player.GetIdentity().GetId()) continue;
                    temp_player.SetHealth(0);
                }
                break;
            }
 
            case "heal": {
                PlayerBase heal_target;
                if(count == 2) {
                    heal_target = GetPlayer(tokens[1]);
                    if(heal_target == NULL) {
                        SendMessageToPlayer(player, "[Heal] Can't find player called: '"+tokens[1]+"'");
                    } else {
                        SendMessageToPlayer(player, "[Heal] You healed " + heal_target.GetIdentity().GetName());
                    }
                } else {
                    heal_target = player;
                    SendMessageToPlayer(player, "[Heal] You healed yourself");
                }
                if(heal_target != NULL) {
                    heal_target.SetHealth(heal_target.GetMaxHealth("", ""));
                    heal_target.SetHealth("", "Blood", heal_target.GetMaxHealth("", "Blood"));
                    heal_target.GetStatStamina().Set(1000);
                    heal_target.GetStatEnergy().Set(1000);
                    heal_target.GetStatWater().Set(1000);
                }
                break;
            }
 
            case "offroad": {
                SendMessageToPlayer(player, "[Offroad] Vehicled spawned");
                EntityAI v;
                v = GetGame().CreateObject( "OffroadHatchback", player.GetPosition() + "1.5 0 1.5");          
                v.GetInventory().CreateAttachment("SparkPlug");
                v.GetInventory().CreateAttachment("EngineBelt");
                v.GetInventory().CreateAttachment("CarBattery");
                v.GetInventory().CreateAttachment("HatchbackHood");
                v.GetInventory().CreateAttachment("HatchbackTrunk");
                v.GetInventory().CreateAttachment("HatchbackDoors_CoDriver");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel");
                v.GetInventory().CreateAttachment("HatchbackWheel"); // spare
                break;
            }
           
            default: {
                SendMessageToPlayer(player, "Unknown command: " + command);
                break;
            }
        }
    }
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.5, 0.8 );
    weather.GetRain().SetForecastChangeLimits( 0.1, 0.3 );
    weather.GetFog().SetForecastChangeLimits( 0.05, 0.10 );

    weather.GetOvercast().SetForecastTimeLimits( 3600 , 3600 );
    weather.GetRain().SetForecastTimeLimits( 300 , 300 );
    weather.GetFog().SetForecastTimeLimits( 3600 , 3600 );

    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(30);
    weather.SetWindFunctionParams(0.1, 1.0, 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("RoadFlare");
        itemBs = ItemBase.Cast(itemEnt);
    }
};
  
Mission CreateCustomMission(string path)
{
    return new CustomMission();
}

Share this post


Link to post
Share on other sites
On 15/11/2018 at 9:57 PM, Terrorista90 said:

Hello, all player see the message in chat, we have the solution for this problem?

Yes, i need too !

Share this post


Link to post
Share on other sites
2 hours ago, SkyzeWayne said:

it doesnt run

Can't complete init script

plugin hordes.c(89)

Undefined function 'AttachEventHandle'

same for me

Share this post


Link to post
Share on other sites
2 hours ago, SkyzeWayne said:

it doesnt run

Can't complete init script

plugin hordes.c(89)

Undefined function 'AttachEventHandle'

Try and add it to your init.c and don't use #include

Edited by Violt

Share this post


Link to post
Share on other sites

Thanks in first !!

 

On my server i work ONLY when the server its empty, only me !!

Or when many player in the server, i tipe a spawn CMD, and it's an another player of me, he take the loot ! You understand ??

Sorry for my bad english :/

 

And identity problem ??

 

I log with my admin pass...

Share this post


Link to post
Share on other sites

One question, this works fine, however if I spawn a car it will vanish after a short time if we leave it. I haven't finished testing spawned tents. Is there something I need to add to make items (or the car at least) persistent?

Share this post


Link to post
Share on other sites

i am not to sure but cars are ment to be like that to stop admin abuse i didnt write the script so not sure how to change it

Share this post


Link to post
Share on other sites
On 17/11/2018 at 5:21 PM, lartdeschoix said:

Thanks in first !!

 

On my server i work ONLY when the server its empty, only me !!

Or when many player in the server, i tipe a spawn CMD, and it's an another player of me, he take the loot ! You understand ??

Sorry for my bad english :/

 

And identity problem ??

 

I log with my admin pass...

make sure you have added your steam id in code line ref TStringArray admins = {"STEAMIDHERE"}; // Add your STEAM64 ID

if still having problems set your name in steam for dayz -name=yourname

Share this post


Link to post
Share on other sites

Works great. I added a few bits from the github version. the weapon classes and the refuel thing.

The admin tools script most servers use is nice but it just does too many things at once and adds a script-construction to the server that  i don't understand. 

 

However 2 (noob) questions:

 

a. is there a way to empty players hands before adding stuff (createinhands)? ideally by putting it into inventory, but maybe by destroying it.

I know i can player.removeyallitems() but that's a bit overkill.

 

and b. i second this one:  

Hello, how to teleport when the survivors have a number ??

Example : /goto Survivor (5) Doesn't work

 

 

 

Edited by 5andysalive

Share this post


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

Works great. I added a few bits from the github version. the weapon classes and the refuel thing.

The admin tools script most servers use is nice but it just does too many things at once and adds a script-construction to the server that  i don't understand. 

 

However 2 (noob) questions:

 

a. is there a way to empty players hands before adding stuff (createinhands)? ideally by putting it into inventory, but maybe by destroying it.

I know i can player.removeyallitems() but that's a bit overkill.

 

and b. i second this one:  

Hello, how to teleport when the survivors have a number ??

Example : /goto Survivor (5) Doesn't work

 

 

 

anyway you can work on removing chat messages from the admin side so it dose not globaly annouce it

Share this post


Link to post
Share on other sites
23 minutes ago, mrwolv said:

anyway you can work on removing chat messages from the admin side so it dose not globaly annouce it

That's actually very simple, make a if-statement before the super of OnEvent, if the message doesn't start with /, do the super, else execute your code.

Share this post


Link to post
Share on other sites
5 minutes ago, IMT said:

That's actually very simple, make a if-statement before the super of OnEvent, if the message doesn't start with /, do the super, else execute your code.

could you edit the config for me please as i dont know to much about it lolz

Share this post


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

could you edit the config for me please as i dont know to much about it lolz

nobody can see it. Only in the rcon tool does it show up as global chat. but not ingame. Neither the /commands nor the # ones. Except for you.  Just tested it with someone next to me.  That's fine. If you have to hide something from your fellow admins, that's your problem :)

Edited by 5andysalive

Share this post


Link to post
Share on other sites

ahh no it shows up globaly to every player im the only admin on the server so if im testing things i dont want all the server to see /spawn apple or /offroad lol

Share this post


Link to post
Share on other sites

well i copied the thing as it is above and it doesnt.  I added some cases but the beginning is the same.

dont know why it does that for you.

Share this post


Link to post
Share on other sites

Use the GitHub version. It is possible to target players with spaces in their names for quite some time now.

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

×