C# Class SharpMod.CounterStrike.PlayerExtensions

Extensions for the Player class for the CounterStrike game mod
显示文件 Open project: txdv/sharpmod

Public Methods

Method Description
ClientColorPrint ( this player, SpecialColor specialColor, string text ) : void

Prints some colored text in the chat (yellow, green, special). You can choose the special color in this Version (A fake teammessage is send to the client and afterwards the information is restored).

ClientColorPrint ( this player, string text ) : void

Prints some colored text in the chat (yellow, green, special). Special is the teamcolor (White for Spectator, Red for Terrorist, Blue for CounterTerrorist)

GetActiveWeapon ( this player ) : Weapon

Get's the Entity of the Weapon weared right now by they player

GetAmmo ( this player, WeaponAmmo ammoType ) : int

Gets the ammount of ammo the player carries around.

GetArmorType ( this player ) : ArmorType
GetArmorTypeID ( this player ) : int
GetDeaths ( this player ) : int

Gets the deathcount of a player

GetDefaultScoreBoardAttribute ( this player ) : ScoreAttribute
GetInternalMode ( this player ) : InternalModels
GetMapzoneRaw ( this player ) : int
GetMoney ( this player ) : int

Gets the amount of money a player posesses The actual server side value is returned.

GetTeamColor ( this player ) : SpecialColor
GetTeamEnum ( this player ) : Team
GetTeamID ( this player ) : int
GetTeamString ( this player ) : string
GetVIP ( this player ) : bool
IsInBuyzone ( this player ) : bool
MakeVIP ( this player, bool updateModel, bool updateScoreboard ) : void
SendAmmo ( this player, WeaponAmmo ammoType, byte ammount ) : void
SendAmmo ( this player, WeaponAmmo ammoType, int ammount ) : void
SendMoneyMessage ( this player, int money, bool flash ) : void

Sends a message to the player in order to update the HUD for the money. Only client side is udpated.

SendTeamInfoMessage ( this player, Player playerTeamChange, Team team ) : void
SendTeamInfoMessage ( this player, Team team ) : void
SendWeaponPickupMessage ( this player, Weapons weapon ) : void
SetAmmo ( this player, WeaponAmmo ammoType, int ammount ) : void

Sets the "backpack" ammo ammount, the ammo the players carries around.

SetArmorType ( this player, ArmorType armorType ) : void
SetArmorType ( this player, int armorType ) : void
SetDeaths ( this player, int val ) : void

Sets the deathcount of a player

SetInternalMode ( this player, InternalModels model ) : void
SetMapzoneRaw ( this player, int mapzone ) : void
SetMoney ( this player, int money ) : void

Sets the amount of money a player posesses. Only server side is updated.

SetMoney ( this player, int money, bool flash ) : void

Sets the player money and sends a message to the player to update Both client and server side.

SetVIP ( this player, bool value ) : void
SetVIP ( this player, bool value, bool updateModel, bool updateScoreBoard ) : void
SetWeaponAnimation ( this player, WeaponAnimations animation ) : void
UnmakeVIP ( this player, bool updateModel, bool updateScoreboard, InternalModels newModel ) : void

Method Details

ClientColorPrint() public static method

Prints some colored text in the chat (yellow, green, special). You can choose the special color in this Version (A fake teammessage is send to the client and afterwards the information is restored).
public static ClientColorPrint ( this player, SpecialColor specialColor, string text ) : void
player this /// A player ///
specialColor SpecialColor /// The SpecialColor you want to send ///
text string /// The text you want to send, you can use C#-style arguments like {0} ///
return void

ClientColorPrint() public static method

Prints some colored text in the chat (yellow, green, special). Special is the teamcolor (White for Spectator, Red for Terrorist, Blue for CounterTerrorist)
public static ClientColorPrint ( this player, string text ) : void
player this /// A player ///
text string /// The text to be printed, C#-style arguments like {0} can be used ///
return void

GetActiveWeapon() public static method

Get's the Entity of the Weapon weared right now by they player
public static GetActiveWeapon ( this player ) : Weapon
player this /// The player ///
return Weapon

GetAmmo() public static method

Gets the ammount of ammo the player carries around.
public static GetAmmo ( this player, WeaponAmmo ammoType ) : int
player this /// The player ///
ammoType WeaponAmmo /// The ammo type ///
return int

GetArmorType() public static method

public static GetArmorType ( this player ) : ArmorType
player this
return ArmorType

GetArmorTypeID() public static method

public static GetArmorTypeID ( this player ) : int
player this
return int

GetDeaths() public static method

Gets the deathcount of a player
public static GetDeaths ( this player ) : int
player this /// A player ///
return int

GetDefaultScoreBoardAttribute() public static method

public static GetDefaultScoreBoardAttribute ( this player ) : ScoreAttribute
player this
return ScoreAttribute

GetInternalMode() public static method

public static GetInternalMode ( this player ) : InternalModels
player this
return InternalModels

GetMapzoneRaw() public static method

public static GetMapzoneRaw ( this player ) : int
player this
return int

GetMoney() public static method

Gets the amount of money a player posesses The actual server side value is returned.
public static GetMoney ( this player ) : int
player this /// Player ///
return int

GetTeamColor() public static method

public static GetTeamColor ( this player ) : SpecialColor
player this
return SpecialColor

GetTeamEnum() public static method

public static GetTeamEnum ( this player ) : Team
player this
return Team

GetTeamID() public static method

public static GetTeamID ( this player ) : int
player this
return int

GetTeamString() public static method

public static GetTeamString ( this player ) : string
player this
return string

GetVIP() public static method

public static GetVIP ( this player ) : bool
player this
return bool

IsInBuyzone() public static method

public static IsInBuyzone ( this player ) : bool
player this
return bool

MakeVIP() public static method

public static MakeVIP ( this player, bool updateModel, bool updateScoreboard ) : void
player this
updateModel bool
updateScoreboard bool
return void

SendAmmo() public static method

public static SendAmmo ( this player, WeaponAmmo ammoType, byte ammount ) : void
player this
ammoType WeaponAmmo
ammount byte
return void

SendAmmo() public static method

public static SendAmmo ( this player, WeaponAmmo ammoType, int ammount ) : void
player this
ammoType WeaponAmmo
ammount int
return void

SendMoneyMessage() public static method

Sends a message to the player in order to update the HUD for the money. Only client side is udpated.
public static SendMoneyMessage ( this player, int money, bool flash ) : void
player this /// The player ///
money int /// The new amount of money the player shoud posess ///
flash bool /// Enables/disables a flash of the money icon in the HUD ///
return void

SendTeamInfoMessage() public static method

public static SendTeamInfoMessage ( this player, Player playerTeamChange, Team team ) : void
player this
playerTeamChange Player
team Team
return void

SendTeamInfoMessage() public static method

public static SendTeamInfoMessage ( this player, Team team ) : void
player this
team Team
return void

SendWeaponPickupMessage() public static method

public static SendWeaponPickupMessage ( this player, Weapons weapon ) : void
player this
weapon Weapons
return void

SetAmmo() public static method

Sets the "backpack" ammo ammount, the ammo the players carries around.
public static SetAmmo ( this player, WeaponAmmo ammoType, int ammount ) : void
player this /// the player ///
ammoType WeaponAmmo /// The weaponammo type ///
ammount int
return void

SetArmorType() public static method

public static SetArmorType ( this player, ArmorType armorType ) : void
player this
armorType ArmorType
return void

SetArmorType() public static method

public static SetArmorType ( this player, int armorType ) : void
player this
armorType int
return void

SetDeaths() public static method

Sets the deathcount of a player
public static SetDeaths ( this player, int val ) : void
player this /// A player ///
val int /// The deathcount the player shall have afterwards ///
return void

SetInternalMode() public static method

public static SetInternalMode ( this player, InternalModels model ) : void
player this
model InternalModels
return void

SetMapzoneRaw() public static method

public static SetMapzoneRaw ( this player, int mapzone ) : void
player this
mapzone int
return void

SetMoney() public static method

Sets the amount of money a player posesses. Only server side is updated.
public static SetMoney ( this player, int money ) : void
player this /// The player ///
money int /// The amount of money ///
return void

SetMoney() public static method

Sets the player money and sends a message to the player to update Both client and server side.
public static SetMoney ( this player, int money, bool flash ) : void
player this /// The player ///
money int /// The amount of money the player will posess afterwards ///
flash bool /// Wether to make the HUD flash(True) or not(False) ///
return void

SetVIP() public static method

public static SetVIP ( this player, bool value ) : void
player this
value bool
return void

SetVIP() public static method

public static SetVIP ( this player, bool value, bool updateModel, bool updateScoreBoard ) : void
player this
value bool
updateModel bool
updateScoreBoard bool
return void

SetWeaponAnimation() public static method

public static SetWeaponAnimation ( this player, WeaponAnimations animation ) : void
player this
animation WeaponAnimations
return void

UnmakeVIP() public static method

public static UnmakeVIP ( this player, bool updateModel, bool updateScoreboard, InternalModels newModel ) : void
player this
updateModel bool
updateScoreboard bool
newModel InternalModels
return void