C# 클래스 SharpMod.Player

상속: Entity
파일 보기 프로젝트 열기: txdv/sharpmod 1 사용 예제들

공개 메소드들

메소드 설명
Ban ( string message, int minutes ) : void

Issue the server commands to ban a player by ip.

ExecuteCommand ( string command ) : void

Executes a supplied command on the client side of the player.

Find ( string target ) : Player
FindByAuthId ( string authId ) : Player

Finds an active Player by authid.

FindByName ( string name ) : Player

Finds an active Player by name

FindByUserId ( int id ) : Player
FindByUserId ( string id ) : Player
GetInfoKeyValue ( string key ) : string

Gets a specific value for a key from the infokeybuffer

GetPlayer ( IntPtr entity ) : Player

Gets a Player according to the entity pointer. Needed most of the time for internal engine calls, since the entity pointer is used a lot.

GetUserID ( Player player ) : int
GiveItem ( string itemname ) : Entity
Kick ( string message ) : void

Issue the server command to kick this player.

PrintCenter ( string text ) : void

Prints some text to the Player central screen

PrintChat ( string text ) : void

Prints some text to the players text in one color.

PrintConsole ( string text ) : void

Prints some text to the Players Console.

RegisterCommand ( string str, ClientCommandDelegate handler ) : void
ReloadAllPrivileges ( ) : void
ReloadPrivileges ( ) : void
SetInfoKeyValue ( string key, string val ) : void

Sets some specific InfoKeyValue according to a key.

StripUserWeapons ( ) : void
ToString ( ) : string

Returns a string representation of the player class

UpdateUserInfo ( ) : void
UpdateUserInfo ( string infoString ) : void

보호된 메소드들

메소드 설명
OnAssignPrivileges ( AssignPrivilegesEventArgs args ) : void
OnAuthorize ( AuthorizeEventArgs args ) : void
OnCommand ( CommandEventArgs args ) : void
OnConnect ( ConnectEventArgs args ) : void
OnDisconnect ( DisconnectEventArgs args ) : void
OnPlayerAssignPrivileges ( AssignPrivilegesEventArgs args ) : void
OnPlayerAuthorize ( AuthorizeEventArgs args ) : void
OnPlayerClientDisconnect ( DisconnectEventArgs args ) : void
OnPlayerCommand ( CommandEventArgs args ) : void
OnPlayerConnect ( ConnectEventArgs args ) : void
OnPlayerPutInServer ( PutInServerEventArgs args ) : void
OnPutInServer ( PutInServerEventArgs args ) : void

비공개 메소드들

메소드 설명
OnAssignPrivileges ( Player player, Privileges privileges ) : void
OnAuthorize ( Player player ) : void
OnCommand ( IntPtr entity ) : void
OnConnect ( IntPtr entity, string name, string address, string reject_reason ) : bool
OnDisconnect ( IntPtr entity ) : void
OnPutInServer ( IntPtr entity ) : void
Player ( IntPtr entity ) : System

Constructor for internal building of Players

Release ( ) : void

Releases the event handlers

ResolvedBans ( BanInfo information ) : void
ResolvedPrivileges ( PlayerInfo pi, Privileges priv ) : void

메소드 상세

Ban() 공개 메소드

Issue the server commands to ban a player by ip.
public Ban ( string message, int minutes ) : void
message string /// A reason to kick/ban ///
minutes int /// The amount of minutes to ban a player by ip ///
리턴 void

ExecuteCommand() 공개 메소드

Executes a supplied command on the client side of the player.
public ExecuteCommand ( string command ) : void
command string /// A command as a string which must end with ; ///
리턴 void

Find() 공개 정적인 메소드

public static Find ( string target ) : Player
target string
리턴 Player

FindByAuthId() 공개 정적인 메소드

Finds an active Player by authid.
public static FindByAuthId ( string authId ) : Player
authId string /// AuthId to search by ///
리턴 Player

FindByName() 공개 정적인 메소드

Finds an active Player by name
public static FindByName ( string name ) : Player
name string /// Name to search by ///
리턴 Player

FindByUserId() 공개 정적인 메소드

public static FindByUserId ( int id ) : Player
id int
리턴 Player

FindByUserId() 공개 정적인 메소드

public static FindByUserId ( string id ) : Player
id string
리턴 Player

GetInfoKeyValue() 공개 메소드

Gets a specific value for a key from the infokeybuffer
public GetInfoKeyValue ( string key ) : string
key string /// The key name ///
리턴 string

GetPlayer() 공개 정적인 메소드

Gets a Player according to the entity pointer. Needed most of the time for internal engine calls, since the entity pointer is used a lot.
public static GetPlayer ( IntPtr entity ) : Player
entity System.IntPtr /// A pointer to the entity class ///
리턴 Player

GetUserID() 공개 정적인 메소드

public static GetUserID ( Player player ) : int
player Player
리턴 int

GiveItem() 공개 메소드

public GiveItem ( string itemname ) : Entity
itemname string
리턴 Entity

Kick() 공개 메소드

Issue the server command to kick this player.
public Kick ( string message ) : void
message string /// A reason for kicking ///
리턴 void

OnAssignPrivileges() 보호된 정적인 메소드

protected static OnAssignPrivileges ( AssignPrivilegesEventArgs args ) : void
args AssignPrivilegesEventArgs
리턴 void

OnAuthorize() 보호된 정적인 메소드

protected static OnAuthorize ( AuthorizeEventArgs args ) : void
args AuthorizeEventArgs
리턴 void

OnCommand() 보호된 정적인 메소드

protected static OnCommand ( CommandEventArgs args ) : void
args CommandEventArgs
리턴 void

OnConnect() 보호된 정적인 메소드

protected static OnConnect ( ConnectEventArgs args ) : void
args ConnectEventArgs
리턴 void

OnDisconnect() 보호된 정적인 메소드

protected static OnDisconnect ( DisconnectEventArgs args ) : void
args DisconnectEventArgs
리턴 void

OnPlayerAssignPrivileges() 보호된 메소드

protected OnPlayerAssignPrivileges ( AssignPrivilegesEventArgs args ) : void
args AssignPrivilegesEventArgs
리턴 void

OnPlayerAuthorize() 보호된 메소드

protected OnPlayerAuthorize ( AuthorizeEventArgs args ) : void
args AuthorizeEventArgs
리턴 void

OnPlayerClientDisconnect() 보호된 메소드

protected OnPlayerClientDisconnect ( DisconnectEventArgs args ) : void
args DisconnectEventArgs
리턴 void

OnPlayerCommand() 보호된 메소드

protected OnPlayerCommand ( CommandEventArgs args ) : void
args CommandEventArgs
리턴 void

OnPlayerConnect() 보호된 메소드

protected OnPlayerConnect ( ConnectEventArgs args ) : void
args ConnectEventArgs
리턴 void

OnPlayerPutInServer() 보호된 메소드

protected OnPlayerPutInServer ( PutInServerEventArgs args ) : void
args PutInServerEventArgs
리턴 void

OnPutInServer() 보호된 정적인 메소드

protected static OnPutInServer ( PutInServerEventArgs args ) : void
args PutInServerEventArgs
리턴 void

PrintCenter() 공개 메소드

Prints some text to the Player central screen
public PrintCenter ( string text ) : void
text string /// Text to print ///
리턴 void

PrintChat() 공개 메소드

Prints some text to the players text in one color.
public PrintChat ( string text ) : void
text string /// Text to print ///
리턴 void

PrintConsole() 공개 메소드

Prints some text to the Players Console.
public PrintConsole ( string text ) : void
text string /// Text to print ///
리턴 void

RegisterCommand() 공개 정적인 메소드

public static RegisterCommand ( string str, ClientCommandDelegate handler ) : void
str string
handler ClientCommandDelegate
리턴 void

ReloadAllPrivileges() 공개 정적인 메소드

public static ReloadAllPrivileges ( ) : void
리턴 void

ReloadPrivileges() 공개 메소드

public ReloadPrivileges ( ) : void
리턴 void

SetInfoKeyValue() 공개 메소드

Sets some specific InfoKeyValue according to a key.
public SetInfoKeyValue ( string key, string val ) : void
key string /// The key ///
val string /// The value which has to be set to the key ///
리턴 void

StripUserWeapons() 공개 메소드

public StripUserWeapons ( ) : void
리턴 void

ToString() 공개 메소드

Returns a string representation of the player class
public ToString ( ) : string
리턴 string

UpdateUserInfo() 공개 메소드

public UpdateUserInfo ( ) : void
리턴 void

UpdateUserInfo() 공개 메소드

public UpdateUserInfo ( string infoString ) : void
infoString string
리턴 void