SharpMod.Server.EnqueueCommand C# (CSharp) Method

EnqueueCommand() public static method

Enques a command in the server command queue. Server.ExecuteEnqueuedCommands() is needed to execute all enqueued commands. If you want to call multiple commands at once, use the newline character in order to seperate the commands
public static EnqueueCommand ( string command ) : void
command string /// The command to execute ///
return void
        public static void EnqueueCommand(string command)
        {
            MetaModEngine.engineFunctions.ServerCommand(command + "\n");
        }

Usage Example

Beispiel #1
0
 /// <summary>
 /// Issue the server command to kick this player.
 /// </summary>
 /// <param name="message">
 /// A reason for kicking <see cref="System.String"/>
 /// </param>
 public void Kick(string message)
 {
     Server.EnqueueCommand("kick {0} {1}", Name, message);
     Server.ExecuteEnqueuedCommands();
 }
All Usage Examples Of SharpMod.Server::EnqueueCommand