1. cookyman

    cookyman Naked Wanderer

    Hello,
    I have the following problem.

    I want to leave with a chat command, an airdrop spawn,
    I would like to have this as special right for a player.

    My code:

    Code (Text):
            private static void mycode()
            {
                int _STuntil = GameUtils.WorldTimeToHours(GameManager.Instance.World.GetWorldTime());
                switch (_STuntil)
                {
                    case 1:
                        SdtdConsole.Instance.ExecuteSync(string.Format("spawnairdrop");
                        break;
                }
            }
    i have this error:

    Severity Code Description Project File Line Suppression State
    Error CS7036 There is no argument given that corresponds to the required formal parameter '_cInfo' of 'SdtdConsole.ExecuteSync(string, ClientInfo)' GESM Bot C:\Users\cooky\documents\visual studio 2015\Projects\GESM Bot\GESM Bot\Chat\spawnair.cs 50 Active



    i called this mycode with a thread, please help
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Is this a plugin you are making? According to the error and your code, you're missing the ClientInfo for that method.
     
  3. mspeedie

    mspeedie Plugin Developer

    I'm trying to access the GameUtils and GameStats. But this is not toggled by player activity as I am trying to get up periodic alerts.

    I slapped ClientInfo _cInfo into Loaded, but I know it is not right. Is there anyway to poll server times and server day length besides pulling it from ClientInfo? Otherwise I don't think I will be able to create a periodic alert that is aware of the server time.

    Attached is the WIP code.

    Thoughts or Suggestions?

    Good work on DaySeven.cs Cookyman. I am making this period reminder inspired by your code at a request of a friend of mine.