Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.08 KB | None | 0 0
  1. abstract_class IPlayerInfo
  2. {
  3. public:
  4.     // returns the players name (UTF-8 encoded)
  5.     virtual const char *GetName() = 0;
  6.     // returns the userid (slot number)
  7.     virtual int     GetUserID() = 0;
  8.     // returns the string of their network (i.e Steam) ID
  9.     virtual const char *GetNetworkIDString() = 0;
  10.     // returns the team the player is on
  11.     virtual int GetTeamIndex() = 0;
  12.     // changes the player to a new team (if the game dll logic allows it)
  13.     virtual void ChangeTeam( int iTeamNum ) = 0;
  14.     // returns the number of kills this player has (exact meaning is mod dependent)
  15.     virtual int GetFragCount() = 0;
  16.     // returns the number of deaths this player has (exact meaning is mod dependent)
  17.     virtual int GetDeathCount() = 0;
  18.     // returns if this player slot is actually valid
  19.     virtual bool IsConnected() = 0;
  20.     // returns the armor/health of the player (exact meaning is mod dependent)
  21.     virtual int GetArmorValue() = 0;
  22.  
  23.     // extensions added to V2
  24.  
  25.     // various player flags
  26.     virtual bool IsHLTV() = 0;
  27.     //virtual void Padding() = 0;
  28.     //virtual void Padding2() = 0;
  29.     //virtual void Padding3() = 0;
  30.     virtual bool IsPlayer() = 0;
  31.     virtual bool IsFakeClient() = 0;
  32.     virtual bool IsDead() = 0;
  33.     virtual bool IsInAVehicle() = 0;
  34.     virtual bool IsObserver() = 0;
  35.  
  36.     // player position and size
  37.     virtual const Vector GetAbsOrigin() = 0;
  38.     virtual const QAngle GetAbsAngles() = 0;
  39.     virtual const Vector GetPlayerMins() = 0;
  40.     virtual const Vector GetPlayerMaxs() = 0;
  41.     // the name of the weapon currently being carried
  42.     virtual const char *GetWeaponName() = 0;
  43.     // the name of the player model in use
  44.     virtual const char *GetModelName() = 0;
  45.     // current player health
  46.     virtual const int GetHealth() = 0;
  47.     // max health value
  48.     virtual const int GetMaxHealth() = 0;
  49.     // the last user input from this player
  50.     virtual CBotCmd GetLastUserCommand() = 0;
  51.     virtual bool IsReplay() = 0;
  52. };
  53.  
  54.  
  55. #define INTERFACEVERSION_PLAYERINFOMANAGER          "PlayerInfoManager002"
  56. abstract_class IPlayerInfoManager
  57. {
  58. public:
  59.     virtual IPlayerInfo *GetPlayerInfo( edict_t *pEdict ) = 0;
  60.     virtual CGlobalVars *GetGlobalVars() = 0;
  61. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement