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