Run a console command through plugin?Solved
Hello, I have been trying to find out how to run certin console commands throught a plugin. etc "spawn sedan". When I add this to the plugin, It will run but it will spawn randomlly arround the map. Anyone know how to have it spawn infront of the person running the command? Any help would be greatlly aprecated.

My Current code is
        //Spawn Sedan
        [ChatCommand("spawnsedan")]
        void SpawnSedan(BasePlayer player)
        {
            if (permission.UserHasPermission(player.userID.ToString(), "AdminPlugin.spawn"))
            {
                ConsoleSystem.Run(ConsoleSystem.Option.Server.Quiet(), "spawn sedan");
                PrintToChat(player, "Sedan Spawned");
            }
            else
            {
                PrintToChat(player, "You Do Not Have The Permissions To Run This Command");
            }
        }​


It's spawn shortname position rotation. Position and rotation can be 3,3,3 or (4, 5, 6)
Thank you for the quick reply, This seemed to fix my problem. Thank you very much.
Locked automatically