C# Class SharpMod.CounterStrike.PlayerExtensions

Extensions for the Player class for the CounterStrike game mod
Afficher le fichier Open project: txdv/sharpmod

Méthodes publiques

Méthode 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 méthode

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} ///
Résultat void

ClientColorPrint() public static méthode

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 ///
Résultat void

GetActiveWeapon() public static méthode

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

GetAmmo() public static méthode

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 ///
Résultat int

GetArmorType() public static méthode

public static GetArmorType ( this player ) : ArmorType
player this
Résultat ArmorType

GetArmorTypeID() public static méthode

public static GetArmorTypeID ( this player ) : int
player this
Résultat int

GetDeaths() public static méthode

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

GetDefaultScoreBoardAttribute() public static méthode

public static GetDefaultScoreBoardAttribute ( this player ) : ScoreAttribute
player this
Résultat ScoreAttribute

GetInternalMode() public static méthode

public static GetInternalMode ( this player ) : InternalModels
player this
Résultat InternalModels

GetMapzoneRaw() public static méthode

public static GetMapzoneRaw ( this player ) : int
player this
Résultat int

GetMoney() public static méthode

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

GetTeamColor() public static méthode

public static GetTeamColor ( this player ) : SpecialColor
player this
Résultat SpecialColor

GetTeamEnum() public static méthode

public static GetTeamEnum ( this player ) : Team
player this
Résultat Team

GetTeamID() public static méthode

public static GetTeamID ( this player ) : int
player this
Résultat int

GetTeamString() public static méthode

public static GetTeamString ( this player ) : string
player this
Résultat string

GetVIP() public static méthode

public static GetVIP ( this player ) : bool
player this
Résultat bool

IsInBuyzone() public static méthode

public static IsInBuyzone ( this player ) : bool
player this
Résultat bool

MakeVIP() public static méthode

public static MakeVIP ( this player, bool updateModel, bool updateScoreboard ) : void
player this
updateModel bool
updateScoreboard bool
Résultat void

SendAmmo() public static méthode

public static SendAmmo ( this player, WeaponAmmo ammoType, byte ammount ) : void
player this
ammoType WeaponAmmo
ammount byte
Résultat void

SendAmmo() public static méthode

public static SendAmmo ( this player, WeaponAmmo ammoType, int ammount ) : void
player this
ammoType WeaponAmmo
ammount int
Résultat void

SendMoneyMessage() public static méthode

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 ///
Résultat void

SendTeamInfoMessage() public static méthode

public static SendTeamInfoMessage ( this player, Player playerTeamChange, Team team ) : void
player this
playerTeamChange Player
team Team
Résultat void

SendTeamInfoMessage() public static méthode

public static SendTeamInfoMessage ( this player, Team team ) : void
player this
team Team
Résultat void

SendWeaponPickupMessage() public static méthode

public static SendWeaponPickupMessage ( this player, Weapons weapon ) : void
player this
weapon Weapons
Résultat void

SetAmmo() public static méthode

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
Résultat void

SetArmorType() public static méthode

public static SetArmorType ( this player, ArmorType armorType ) : void
player this
armorType ArmorType
Résultat void

SetArmorType() public static méthode

public static SetArmorType ( this player, int armorType ) : void
player this
armorType int
Résultat void

SetDeaths() public static méthode

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 ///
Résultat void

SetInternalMode() public static méthode

public static SetInternalMode ( this player, InternalModels model ) : void
player this
model InternalModels
Résultat void

SetMapzoneRaw() public static méthode

public static SetMapzoneRaw ( this player, int mapzone ) : void
player this
mapzone int
Résultat void

SetMoney() public static méthode

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 ///
Résultat void

SetMoney() public static méthode

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) ///
Résultat void

SetVIP() public static méthode

public static SetVIP ( this player, bool value ) : void
player this
value bool
Résultat void

SetVIP() public static méthode

public static SetVIP ( this player, bool value, bool updateModel, bool updateScoreBoard ) : void
player this
value bool
updateModel bool
updateScoreBoard bool
Résultat void

SetWeaponAnimation() public static méthode

public static SetWeaponAnimation ( this player, WeaponAnimations animation ) : void
player this
animation WeaponAnimations
Résultat void

UnmakeVIP() public static méthode

public static UnmakeVIP ( this player, bool updateModel, bool updateScoreboard, InternalModels newModel ) : void
player this
updateModel bool
updateScoreboard bool
newModel InternalModels
Résultat void