Table of Contents

Class ConsoleCommandSender

Namespace
SampSharp.Entities.SAMP
Assembly
SampSharp.OpenMp.Entities.dll

Represents a console command sender.

[EventParameter]
public record ConsoleCommandSender : IEquatable<ConsoleCommandSender>
Inheritance
ConsoleCommandSender
Implements
Inherited Members

Constructors

ConsoleCommandSender(ConsoleCommandSender)

protected ConsoleCommandSender(ConsoleCommandSender original)

Parameters

original ConsoleCommandSender

ConsoleCommandSender(Player?, bool, bool, Action<string>?)

Represents a console command sender.

public ConsoleCommandSender(Player? Player, bool IsConsole, bool IsCustom, Action<string>? HandleConsoleMessage)

Parameters

Player Player

The player that sent the command.

IsConsole bool

A value indicating whether the command was sent by the console or a script.

IsCustom bool

A value indicating whether the command was sent by as custom component.

HandleConsoleMessage Action<string>

A function which can be used to return a console message to the sender.

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

HandleConsoleMessage

A function which can be used to return a console message to the sender.

public Action<string>? HandleConsoleMessage { get; init; }

Property Value

Action<string>

IsConsole

A value indicating whether the command was sent by the console or a script.

public bool IsConsole { get; init; }

Property Value

bool

IsCustom

A value indicating whether the command was sent by as custom component.

public bool IsCustom { get; init; }

Property Value

bool

Player

The player that sent the command.

public Player? Player { get; init; }

Property Value

Player

Methods

Deconstruct(out Player?, out bool, out bool, out Action<string>?)

public void Deconstruct(out Player? Player, out bool IsConsole, out bool IsCustom, out Action<string>? HandleConsoleMessage)

Parameters

Player Player
IsConsole bool
IsCustom bool
HandleConsoleMessage Action<string>

Equals(ConsoleCommandSender?)

public virtual bool Equals(ConsoleCommandSender? other)

Parameters

other ConsoleCommandSender

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ConsoleCommandSender?, ConsoleCommandSender?)

public static bool operator ==(ConsoleCommandSender? left, ConsoleCommandSender? right)

Parameters

left ConsoleCommandSender
right ConsoleCommandSender

Returns

bool

operator !=(ConsoleCommandSender?, ConsoleCommandSender?)

public static bool operator !=(ConsoleCommandSender? left, ConsoleCommandSender? right)

Parameters

left ConsoleCommandSender
right ConsoleCommandSender

Returns

bool