A entity used in the game.
Entities are pretty much all things that aren't part of the map.
Inheritance: RemoteObject
Example #1
0
        /// <summary>
        /// Initialize a new TeamInfo based on the offset.
        /// </summary>
        /// <remarks>
        /// DO NOT CALL FROM PLUGIN. Use <see cref="GEntity.Team"/> to get this object.
        /// </remarks>
        /// <param name="Game">The game process</param>
        /// <param name="TeamInfoAddr">The offset of the entity</param>
        /// <param name="ParentEntity">ZombieAPI that initializes this class</param>
        public TeamInfo(Process Game, int TeamInfoAddr, GEntity ParentEntity)
        {
            this.Mem = new RemoteMemory(Game);
            this.BaseOffset = TeamInfoAddr;

            //This points back to the parent enity, however we don't need it so move over...
            Move(4); //0x0000
            a_Team = aInt(); //0x0004
        }
Example #2
0
 void API_OnNativeEvent(GEntity Entity, string EventName)
 {
     // dont test, event not finished
 }
Example #3
0
File: Player.cs Project: jariz/jZm
        /// <summary>
        /// Initialize a new Player based on the offset.
        /// </summary>
        /// <remarks>
        /// DO NOT CALL FROM PLUGIN. Use <see cref="ZombieAPI.GetPlayers"/> to get all players.
        /// </remarks>
        /// <param name="Game">The game process</param>
        /// <param name="PlayerAddr">The offset of the entity</param>
        /// <param name="ParentEntity">The entity that has created this Player</param>
        public Player(Process Game, int PlayerAddr, GEntity ParentEntity)
        {
            this.Mem = new RemoteMemory(Game);
            this.Parent = ParentEntity;
            this.Position = PlayerAddr;
            this.BaseOffset = PlayerAddr;

            a_ServerTime = aInt(); //0x0000
            Move(36); //0x0004
            a_Origin = aVec(3); //0x0028
            a_Velocity = aVec(3); //0x0034
            Move(76); //0x0040
            a_Gravity = aInt(); //0x008C
            Move(4); //0x0090
            a_Speed = aInt(); //0x0094
            Move(352); //0x0098
            a_ViewAngles = aVec(3); //0x01F8
            a_PlayerHeightInt = aInt(); //0x0204
            a_PlayerHeightFloat = aInt(); //0x0208 (WARNING: Actually is a float, but it's 4 bytes eitherway so f**k the police)
            Move(44); //0x020C
            a_Health = aInt(); //0x0238
            Move(4); //0x023C
            a_iMaxHealth = aInt(); //0x0240
            Move(32); //0x0244
            a_PrimaryWeaponID = aInt(); //0x0264
            Move(24); //0x0268
            a_LethalWeaponID = aInt(); //0x0280
            Move(24); //0x0284
            a_SecondaryWeaponID = aInt(); //0x029C
            Move(24); //0x02A0
            a_TacticalWeaponID = aInt(); //0x02B8
            Move(308); //0x02BC
            a_PrimaryAmmoStock = aInt(); //0x03F0
            Move(4); //0x03F4
            a_SecondaryAmmoStock = aInt(); //0x03F8
            Move(48); //0x03FC
            a_PrimaryAmmoClip = aInt(); //0x042C
            a_LethalAmmo = aInt(); //0x0430
            a_SecondaryAmmoClip = aInt(); //0x0434
            a_TacticalAmmo = aInt(); //0x0438
            Move(272); //0x043C
            a_PerkFlags = aInt(); //0x054C 0x10 = Reduced Spread, 0x80000 = Faster Knife
            Move(5752); //0x0550
            a_Alive = aInt(); //0x1BC8
            Move(14560); //0x1BCC
            a_Name2 = aString(); //0x54AC
            Move(16); //0x54BC
            a_MaxHealth = aInt(); //0x54CC
            //Move(100); //0x54D0
            Move(16); //0x054D0
            a_SpeedScale = aInt(); //0x54E0
            Move(12); //0x54E4
            a_inSecondChance = aInt(); //0x54F0
            Move(64); //0x54F4
            a_Name = aString(); //0x5534
            Move(20); //0x5544
            a_Rank = aInt(); //0x5558
            a_Prestige = aInt(); //0x555C
            Move(16); //0x55560
            a_XUID = aLong(); //0x5570
            Move(76); //0x5578
            a_Headshots = aInt(); //0x55C4
            a_Money = aInt(); //0x55C8
            a_Kills = aInt(); //0x55CC
            a_Assists = aInt(); //0x55D0
            a_Deaths = aInt(); //0x55D4
            Move(24); //0x55D8
            a_Downs = aInt(); //0x55F0
            a_Revives = aInt(); //0x55F4
            //Move(140); //0x55F8
            Move(96); //0x55F8
            a_x2Score = aInt(); //0x5658
            Move(40); //0x565C
            a_ClippingMode = aInt(); //0x5684
            Move(368); //0x5688

            Weapons = new Weapons_(this);
            World = new World_(this);
            Stats = new Stats_(this);
        }