Difference between revisions of "CCSPlayer"

From AlliedModders Wiki
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Disclaimer:''' <i>The viability of these signatures listed herein are <b>not</b> guaranteed. AlliedModders and wiki contributors are not responsible for any damage or loss caused by the use of these signatures. THESE SIGNATURES ARE PROVIDED 'AS-IS'.</i><br /><br />
+
'''Disclaimer:''' <i>The viability of the information listed herein is <b>not</b> guaranteed. AlliedModders and wiki contributors are not responsible for any damage or loss caused by the use of said 'information'. THE INFORMATION IS PROVIDED 'AS-IS'.</i><br /><br />
  
  
Line 12: Line 12:
 
Some possibly useful offsets for CCSPlayer, taken from http://www.bailopan.net/table_dump.txt: <br />
 
Some possibly useful offsets for CCSPlayer, taken from http://www.bailopan.net/table_dump.txt: <br />
 
<pre> -Member: csnonlocaldata (offset 0)
 
<pre> -Member: csnonlocaldata (offset 0)
  -Member: m_iThrowGrenadeCounter (offset 4784)
+
  -Member: m_iThrowGrenadeCounter (offset 5604)
  -Member: m_iAddonBits (offset 5052)
+
  -Member: m_iAddonBits (offset 5880)
  -Member: m_iPrimaryAddon (offset 5056)
+
  -Member: m_iPrimaryAddon (offset 5884)
  -Member: m_iSecondaryAddon (offset 5060)
+
  -Member: m_iSecondaryAddon (offset 5888)
  -Member: m_iPlayerState (offset 3556)
+
  -Member: m_iPlayerState (offset 4324)
  -Member: m_iAccount (offset 3608)
+
  -Member: m_iAccount (offset 4408)
  -Member: m_bInBombZone (offset 4692)
+
  -Member: m_bInBombZone (offset 5496)
  -Member: m_bInBuyZone (offset 4693)
+
  -Member: m_bInBuyZone (offset 5497)
  -Member: m_iClass (offset 4840)
+
  -Member: m_iClass (offset 5664)
  -Member: m_ArmorValue (offset 3064)
+
  -Member: m_ArmorValue (offset 3288)
  -Member: m_angEyeAngles[0] (offset 4876)
+
  -Member: m_angEyeAngles[0] (offset 5704)
  -Member: m_angEyeAngles[1] (offset 4880)
+
  -Member: m_angEyeAngles[1] (offset 5708)
  -Member: m_bHasDefuser (offset 3652)
+
  -Member: m_bHasDefuser (offset 4452)
  -Member: m_bNightVisionOn (offset 3654)
+
  -Member: m_bNightVisionOn (offset 4454)
  -Member: m_bHasNightVision (offset 3653)
+
  -Member: m_bHasNightVision (offset 4453)
  -Member: m_bInHostageRescueZone (offset 4700)
+
  -Member: m_bInHostageRescueZone (offset 5504)
  -Member: m_bIsDefusing (offset 3584)
+
  -Member: m_bIsDefusing (offset 4352)
  -Member: m_bHasHelmet (offset 3592)
+
  -Member: m_bHasHelmet (offset 4392)
  -Member: m_flFlashDuration (offset 4768)
+
  -Member: m_flFlashDuration (offset 5588)
  -Member: m_flFlashMaxAlpha (offset 4772)
+
  -Member: m_flFlashMaxAlpha (offset 5592)
  -Member: m_iProgressBarDuration (offset 4780)
+
  -Member: m_iProgressBarDuration (offset 5600)
  -Member: m_flProgressBarStartTime (offset 4776)
+
  -Member: m_flProgressBarStartTime (offset 5596)
  -Member: m_hRagdoll (offset 4788)
+
  -Member: m_hRagdoll (offset 5608)
  -Member: m_cycleLatch (offset 5184)</pre>
+
  -Member: m_cycleLatch (offset 6012)</pre>
  
 
= Signatures =
 
= Signatures =
Line 85: Line 85:
 
**<pre>\x2A\x2A\x2A\x8B\x44\x24\x44\x53\x56\x57\x2A\x2A\x8B\xF9\x50\x8D\x4C\x24\x34\x51\x2A\x2A\x2A\x2A\x2A</pre>
 
**<pre>\x2A\x2A\x2A\x8B\x44\x24\x44\x53\x56\x57\x2A\x2A\x8B\xF9\x50\x8D\x4C\x24\x34\x51\x2A\x2A\x2A\x2A\x2A</pre>
 
** Length 25
 
** Length 25
 +
* Linux Signature:
 +
**<pre>@_ZN9CCSPlayer10ChangeNameEPKc</pre>
  
 
== DropWeapons ==
 
== DropWeapons ==
 
* Description: <pre>Forces a player to drop the weapon they are holding.</pre>
 
* Description: <pre>Forces a player to drop the weapon they are holding.</pre>
 
** <b>NOTE:</b> This will not apply a 'force' vector to the weapon. It will just drop the weapon in place.
 
** <b>NOTE:</b> This will not apply a 'force' vector to the weapon. It will just drop the weapon in place.
* Calling Convention: <cpp>__thiscall</cpp> ''Hexrays says __fastcall. wut?''
+
* Calling Convention: <cpp>__thiscall</cpp> ''Hexrays says __fastcall. wut?''<br />
 
* Prototype: <cpp>void CCSPlayer::DropWeapons(void)</cpp>
 
* Prototype: <cpp>void CCSPlayer::DropWeapons(void)</cpp>
  
Line 97: Line 99:
 
**<pre>\x2A\x2A\x2A\x56\x57\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x8B\xF1\x2A\x2A\x2A\x2A\x2A\x85\xC0\x74\x0C\x2A\x2A\x2A\x2A\x50\x8B\xCE</pre>
 
**<pre>\x2A\x2A\x2A\x56\x57\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x8B\xF1\x2A\x2A\x2A\x2A\x2A\x85\xC0\x74\x0C\x2A\x2A\x2A\x2A\x50\x8B\xCE</pre>
 
** Length 30
 
** Length 30
 +
 +
== SwitchTeam ==
 +
* Description: <pre>Changes a player's team without killing them or changing their model.</pre>
 +
* Calling Convention: <cpp>__thiscall</cpp>
 +
* Prototype: <cpp>void CCSPlayer::SwitchTeam(int iTeamIndex)</cpp>
 +
 +
* Parameters:
 +
** <code>iTeamIndex</code>: The index of the team you wish to change the player to.
 +
* Signature
 +
**<pre>\x2A\x2A\x2A\x56\x57\x8B\x7C\x24\x1C\x57\x8B\xF1\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x85\xC0\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A</pre>
 +
** Length 33

Latest revision as of 09:37, 30 September 2010

Disclaimer: The viability of the information listed herein is not guaranteed. AlliedModders and wiki contributors are not responsible for any damage or loss caused by the use of said 'information'. THE INFORMATION IS PROVIDED 'AS-IS'.


Basic Information

Classname: CCSPlayer
Description: Representation of a Counter-Strike: Source player.
Virtual Table Dump: [1]
Class Hierarchy: (Highest to Lowest) CCSPlayer -> CBasePlayer -> CBaseCombatCharacter -> CBaseFlex -> CBaseAnimatingOverlay -> CBaseAnimating -> CBaseEntity -> IServerEntity -> IServerNetworkable -> IHandleEntity

Entity Properties

Current as of September 28-29
Some possibly useful offsets for CCSPlayer, taken from http://www.bailopan.net/table_dump.txt:

 -Member: csnonlocaldata (offset 0)
 -Member: m_iThrowGrenadeCounter (offset 5604)
 -Member: m_iAddonBits (offset 5880)
 -Member: m_iPrimaryAddon (offset 5884)
 -Member: m_iSecondaryAddon (offset 5888)
 -Member: m_iPlayerState (offset 4324)
 -Member: m_iAccount (offset 4408)
 -Member: m_bInBombZone (offset 5496)
 -Member: m_bInBuyZone (offset 5497)
 -Member: m_iClass (offset 5664)
 -Member: m_ArmorValue (offset 3288)
 -Member: m_angEyeAngles[0] (offset 5704)
 -Member: m_angEyeAngles[1] (offset 5708)
 -Member: m_bHasDefuser (offset 4452)
 -Member: m_bNightVisionOn (offset 4454)
 -Member: m_bHasNightVision (offset 4453)
 -Member: m_bInHostageRescueZone (offset 5504)
 -Member: m_bIsDefusing (offset 4352)
 -Member: m_bHasHelmet (offset 4392)
 -Member: m_flFlashDuration (offset 5588)
 -Member: m_flFlashMaxAlpha (offset 5592)
 -Member: m_iProgressBarDuration (offset 5600)
 -Member: m_flProgressBarStartTime (offset 5596)
 -Member: m_hRagdoll (offset 5608)
 -Member: m_cycleLatch (offset 6012)

Signatures

This section will be devoted to listing signatures for the methods of CCSPlayer.

AddAccount

  • Description:
    Adds money to a player's account.
  • Calling Convention:
    __thiscall
  • Prototype:
    void CCSPlayer::AddAccount(int amount, bool bTrackChange=true)
  • Parameters:
    • amount: The amount to add.
    • bTrackChange: Should the server keep track of this change?
  • Signature:
    • \x56\x2A\x2A\x2A\x2A\x2A\x2A\x8D\x44\x24\x08\x50\x8B\xCE\x2A\x2A\x2A\x2A\x2A\x8B\x06\x85\xC0\x2A\x2A\x8D\x4C\x24\x08
    • Length: 29

Blind

  • Description:
    Blinds a player by turning their screen white.
  • Calling Convention:
    __thiscall
  • Prototype:
    void CCSPlayer::Blind(float a, float b, float c);
  • Parameters:
    • Unknown as of this point. So far, only 255, 255, 255 works.
  • Signature:
    • \x2A\xEC\x0C\xD9\x44\x24\x18\x2A\x2A\x57\x8B\xF9\x88\x44\x24\04\x88\x44\x24\x05\x88\x44\x24\x06\x2A\x2A\x2A\x2A\x2A
    • Length: 28

RoundRespawn

  • Description:
    Respawns a player back to a random spawnpoint.
  • Calling Convention:
    __thiscall
  • Prototype:
    void CCSPlayer::RoundRespawn(void)
  • Parameters:
    • None.
  • Signature:
    • \x56\x8B\xF1\x8B\x06\xFF\x90\xB8\x04\x00\x00\x8B\x86\xE8\x0D\x00\x00\x85\xC0\x74\x0E\x8B\x50\x18\x85\xD2\x74\x07\x8B\x48\x1C\x03\xCE\xFF\xD2
    • Length 35

ChangeName

  • Description:
    Changes a player's name.
  • Calling Convention:
    __thiscall
  • Prototype:
    void CCSPlayer::ChangeName(const char* Name)
  • Parameters:
    • Name: Name to change the player's name to.
  • Signature:
    • \x2A\x2A\x2A\x8B\x44\x24\x44\x53\x56\x57\x2A\x2A\x8B\xF9\x50\x8D\x4C\x24\x34\x51\x2A\x2A\x2A\x2A\x2A
    • Length 25
  • Linux Signature:
    • @_ZN9CCSPlayer10ChangeNameEPKc

DropWeapons

  • Description:
    Forces a player to drop the weapon they are holding.
    • NOTE: This will not apply a 'force' vector to the weapon. It will just drop the weapon in place.
  • Calling Convention:
    __thiscall
    Hexrays says __fastcall. wut?
  • Prototype:
    void CCSPlayer::DropWeapons(void)
  • Parameters:
    • None.
  • Signature
    • \x2A\x2A\x2A\x56\x57\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x8B\xF1\x2A\x2A\x2A\x2A\x2A\x85\xC0\x74\x0C\x2A\x2A\x2A\x2A\x50\x8B\xCE
    • Length 30

SwitchTeam

  • Description:
    Changes a player's team without killing them or changing their model.
  • Calling Convention:
    __thiscall
  • Prototype:
    void CCSPlayer::SwitchTeam(int iTeamIndex)
  • Parameters:
    • iTeamIndex: The index of the team you wish to change the player to.
  • Signature
    • \x2A\x2A\x2A\x56\x57\x8B\x7C\x24\x1C\x57\x8B\xF1\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x85\xC0\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A
    • Length 33