Thread: Code

Results 1 to 3 of 3
  1. #1
    klawz's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    3
    My Mood
    Cool

    Code

    Hope you can all learn something from this, or use it to your advantage.

    Aimbot Detection
    Code:
    //---------------------------------------------------------------------------- 
      // AimBot Detector interface 
    
      /// 
      /// @fn void EnableAimBotDetector(); 
      /// Explicity Enable the AimBotDetector 
      /// <p> 
      /// 
      GB_DllExport void EnableAimBotDetector(); 
    
      /// 
      /// @fn void EnableAimBotDetector(size_t historyTimeLength, float historyRateMax); 
      /// Enable the AimBotDetector 
      /// <p> 
      /// Allows manual configuration and enabling of AimBotDetector when using the 
      /// manual Connect call. Consult your GameBlocks support team for appropriate values. 
      ///   @param historyTimeLength Length in seconds of per player movement history. 
      ///   @param historyRateMax Rate in seconds for how often detector will store player frame data 
      /// 
      GB_DllExport void EnableAimBotDetector(size_t historyTimeLength, float historyRateMax); 
    
      /// Explicitly disable the AimBotDetector 
      /// <p> 
      /// Note that the detector stores internal game state, and it isn't intended 
      /// to be toggled off and on with accurate results. This function is provided for 
      /// testing purposes. 
      GB_DllExport void AimBotDisableDetector(); 
    
      /// Enables sending of Aimbot verification data for a specific player. 
      /// <p> 
      /// SetAimBotDetectorDebugPlayer is used during the final integration verification 
      /// phase so that the GameBlocks team can verify the incoming aimbot data. 
      /// This should only be enabled while tuning and verifying the Aimbot integration 
      /// with the GameBlocks team. 
      GB_DllExport void SetAimBotDetectorDebugPlayer(const GBPublicPlayerId & playerId); 
    
      /// Marks the beginning of a frame for AimBotDetector. 
      /// <p> 
      /// This must be called once per frame when using the AimBotDetector before 
      /// calling AimBotDetector_Add() or AimBotDetector_EndFrame() 
      GB_DllExport void AimBotDetector_BeginFrame(); 
    
      /// Adds a frame of data for a given player. 
      /// <p> 
      /// Must be called once per frame, per active player. Do not call for players 
      /// which are not currently spawned or in some other way not part of the  
      /// active game world. Must be called after AimBotDetector_BeginFrame()  
      /// and before AimBotDetector_EndFrame() 
      ///   @param playerId Unique player identifier 
      ///   @param locX Player center X 
      ///   @param locY Player center Y 
      ///   @param locZ Player center Z 
      ///   @param viewLocX Player camera center X 
      ///   @param viewLocY Player camera center Y 
      ///   @param viewLocZ Player camera center Z 
      ///   @param dirX Player camera direction X 
      ///   @param dirY Player camera direction Y 
      ///   @param dirZ Player camera direction Z 
      GB_DllExport void AimBotDetector_Add(const GBPublicPlayerId & playerId, float locX, float locY, float locZ, 
      float viewLocX,float viewLocY,float viewLocZ,float dirX, float dirY, float dirZ); 
    
      /// Marks the end of a frame for AimBotDetector. 
      /// <p> 
      /// This must be called once per frame when using the AimBotDetector after 
      /// calling AimBotDetector_BeginFrame() and AimBotDetector_Add() 
      GB_DllExport void AimBotDetector_EndFrame(); 
    
      /// Triggers the sending of a packet of AimBotDetector data to the GameBlocks 
      /// server. 
      /// <p> 
      /// This function is used by the helper Event_AimBotDetect_Send() and should 
      /// not be called explicitly by the client. 
      ///   @param sourceId Unique Source Id 
      ///   @param playerId Unique player identifier of aggressor 
      ///   @param targetId Unique player identifier for target 
      EGBClientError AimBotDetector_Send(const GBPublicSourceId & sourceId, const GBPublicPlayerId & playerId,  
      const GBPublicPlayerId & targetId);
    Weps
    Code:
    //---------------------------------------------------------------------------- 
      // WeaponCheat Detector interface 
    
      /// 
      /// @fn void EnableWeaponCheatDetector(); 
      /// Enable the WeaponCheatDetector 
      /// <p> 
      /// This gets called automatically if the config-based Connect call is used. 
      /// This can also be called manually if the manual Connect call is used to 
      /// enable the detector using default values. 
      /// 
      GB_DllExport void EnableWeaponCheatDetector(); 
    
      /// 
      /// @fn void EnableWeaponCheatDetector(size_t sampleCount); 
      /// Enable the WeaponCheatDetector 
      /// <p> 
      /// Allows manual configuration and enabling of WeaponCheatDetector when using the 
      /// manual Connect call. Consult your GameBlocks support team for appropriate values. 
      ///   @param sampleCount Number of weapon events to store and send. 
      /// 
      GB_DllExport void EnableWeaponCheatDetector(size_t sampleCount); 
    
      /// 
      /// @fn void WeaponCheatDetector_Add(const GBPublicPlayerId & playerId, int weaponId, bool didHit, float dist, int bodyPart); 
      /// Add the information for a weapon fired event for processing.  
      /// <p> 
      /// Call this every time a weapon impact occurs. 
      ///   @param playerId Unique player identifier of aggressor 
      ///   @param weaponId Unique Weapon Identifier 
      ///   @param didHit True if weapon hit a target (player or AI), false if weapon 
      /// missed (environmental impact or other). 
      ///   @param dist Distance to impacted object. 
      ///   @param bodyPart Id of body part which was hit. -1 if not body part was hit. 
      /// Breaking up your targets into sections identified by bodyPart allows  
      /// for higher fidelity pattern detection based on Aim consistency analysis. 
      /// 
      GB_DllExport void WeaponCheatDetector_Add(const GBPublicPlayerId & playerId, int weaponId,  
      bool didHit, float dist, int bodyPart); 
    
      /// Triggers the sending of a packet of WeaponCheatDetector data to the GameBlocks 
      /// server. 
      /// <p> 
      /// This function is used by the helper Event_WeaponCheatDetect_Send() and should 
      /// not be called explicitly by the client. Note this function does nothing  
      /// if playerId == targetId. 
      ///   @param sourceId Unique Source Id 
      ///   @param playerId Unique player identifier of aggressor 
      EGBClientError WeaponCheatDetector_Send(const GBPublicSourceId & sourceId, const GBPublicPlayerId & playerId);
    Esp/bones
    Code:
    if (fp::GetBonePosition(pSold->m_boneCollisionComponent, 45, &BonePosition))
    fp::W2S(BonePosition, &Out);
    
    float BoxEspX = 1, BoxEspY = 1;
     
                        char State[255];
                        sprintf(State, "%d", pSold->Pose());//without "char" I received a crash in bf4 ((
     
                        if (strcmp(State, "0") == 0)
                        {
                            BoxEspX = 0.4 / (Distance / 1000 * FovState); //стоя
                            BoxEspY = 0.8 / (Distance / 1000 * FovState);
                        }
     
                        if (strcmp(State, "1") == 0)
                        {
                            BoxEspX = 0.4 / (Distance / 1000 * FovState);//сидя
                            BoxEspY = 0.6 / (Distance / 1000 * FovState);
                        }
                        if (strcmp(State, "2") == 0)
                        {
                            BoxEspX = 0.7 / (Distance / 1000 * FovState);// лежа
                            BoxEspY = 0.4 / (Distance / 1000 * FovState);
                        }
     
      if (bCheckMenu[6] &&  !GetVisible)Manager->DrawBorder(Out.x - BoxEspX / 2, Out.y + 6,  BoxEspX, BoxEspY, 1, Manager->retColorCode(iSlideCol[0])); // Draw  Enemy Bounding Box
      if (bCheckMenu[6] &&  GetVisible)Manager->DrawBorder(Out.x - BoxEspX / 2, Out.y + 6,  BoxEspX, BoxEspY, 1, Manager->retColorCode(iSlideCol[17])); // Draw  Enemy Visible Bounding Box
    Weapon data
    Code:
    SoldierWeaponData* pSWD = reinterpret_cast< SoldierWeaponData* >( MyClientSoldierWeapon->m_data );
    Code:
    wClass = pSWD->m_weaponClass;
    		//wType=pSWD->m_animBaseSet;
    		weponname = pSWD->m_damageGiverName.GetString();
    Code:
    #ifndef SoldierWeaponData_H_
    #define SoldierWeaponData_H_
    
    namespace fb
    {
    	
    	class __declspec(align(16)) fb::SoldierWeaponData :
    		public fb::WeaponEntityData //0x00
    	{
    	public:
    		//enumeration is wrong 
    	  fb::PickupSettingsData m_pickupSettings;//0x90
    	  fb::Vec3 m_interactionOffset;//0xB0
    	  fb::CustomizationAccessoryPivots m_customizationAccessoryPivots;//0xC0
    	  fb::String m_damageGiverName;//0x110
    	  fb::RefArray<fb::WeaponZoomLevelData> m_zoomLevels;//0x114
    	  fb::SoldierAimingSimulationData* m_aimingController;//0x11C
    	  fb::FirstPersonCameraData* m_firstPersonCamera;//0x120
    	  fb::HudData m_hud;//0x124
    	  fb::WeaponAnimBaseSetEnum m_animBaseSet;//0x174
    	  fb::QuickThrowTypeEnum m_quickThrowType;//0x178
    	  fb::SoldierWeaponBlueprint* m_soldierWeaponBlueprint;//0x17C
    	  fb::String m_persistenceId;//0x180
    	//  fb::RefArray<fb::SocketData> m_socketsWithoutUnlocks;//0x184
    	  __int32 m_secondaryActionInputAction;//0x18C
    	  fb::CtrRefBase m_voiceOverInfo;//0x190
    	  float m_weaponFloatParam;//0x194
    	  float m_maxRangeMeterDistance;//0x198
    	  bool m_hideWhenOutOfAmmo;//0x19C
    	  bool m_allowSwitchingToWeaponOutOfAmmo;//0x19D
    	  bool m_allowSwitchingToWeaponReloading;//0x19E
    	  bool m_switchToPrimaryWhenOutOfAmmo;//0x19F
    	  bool m_fireAndSwitchBackToPrevSupported;//0x1A0
    	  bool m_allowSwitchingToWeaponInVehicles;//0x1A1
    	  bool m_allowSwitchingToWeaponInWater;//0x1A2
    	  bool m_lowerOnOwnTeam;//0x1A3
    	  bool m_redeployWhenSwitchingWeaponStates;//0x1A4
    	  bool m_useQuickThrowOnAutomaticSwitchback;//0x1A5
    	  bool m_enableBreathControl;//0x1A6
    	  bool m_canBeInSupportedShooting;//0x1A7
    	  bool m_useDetailedRangeMeterQuery;//0x1A8
    	  bool m_isSilenced;//0x1A9
    	};//Size 0x000001B0
    };
    
    #endif
    Code:
    #ifndef WeaponEntityData_H_
    #define WeaponEntityData_H_
    
    namespace fb
    {
    		class __declspec(align(16)) WeaponEntityData :
    		public fb::GameComponentEntityData	//0x0
    	{
    	public:
    		fb::WeaponClassEnum m_weaponClass;//0x70   
    		fb::Arrray<fb::WeaponStateData> m_weaponStates;//0x74
    		WeaponFiringData* m_weaponFiring;//0x78  
    		ZeroingWeaponData* m_customWeaponType;//0x7c
    		fb::BFAIWeaponData* m_aIData;//0x80
    		char _pad_0x84[0xc];	//0x84
    	};// Size 0x00000090
    };
    
    #endif
    Game AI Weapon Data
    Code:
    #ifndef BFAIWeaponData_H_
    #define BFAIWeaponData_H_
    
    namespace fb
    {
    	struct fb::BFAIWeaponData :
    			public fb::GameAIWeaponData
    	{
    	  fb::FiringWeaponClass m_firingWeaponClass;
    	  fb::VoPrimaryFireType m_voPrimaryFireType;
    	  float m_weaponRange;
    	  float m_minimumUsageDistance;
    	  float m_maximumUsageDistance;
    	  fb::PreferredRange* m_preferredRange;
    	  fb::PreferredRange* m_indoorPreferredRange;
    	  fb::PreferredRange* m_outdoorPreferredRange;
    	  fb::FiringIntervalPattern *m_firingIntervalPattern;
    	  fb::BurstIntervalPattern* m_burstIntervalPattern;
    	  fb::SprayPattern* m_sprayPattern;
    	  fb::VehicleAimerSettings* m_vehicleAimerSettings;
    	  fb::VisionModifier* m_visionModifier;
    	  fb::HearingModifier* m_hearingModifier;
    	  fb::TargetModifier* m_targetModifier;
    	  fb::VehicleInaccuracySettings* m_vehicleInaccuracySettings;
    	  fb::SuppressedBehavior* m_suppressedBehavior;
    	  fb::DamageModifier* m_damageModifier;
    	  fb::WeaponRestrictions* m_friendlyWeaponRestrictions;
    	  fb::SpecialBehavior* m_specialBehavior;
    	  fb::WeaponHitProbability * m_humanTargetHitProbability;
    	  fb::ValidAgainst m_validAgainst;
    	};
    };
    
    #endif

    Thanks!

  2. The Following User Says Thank You to klawz For This Useful Post:

    CraftBugers (12-03-2013)

  3. #2
    Terrified's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Location
    Yes.
    Posts
    3,272
    Reputation
    1022
    Thanks
    977
    My Mood
    Doh
    Is it on C++?

  4. #3
    klawz's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    3
    My Mood
    Cool
    Yes it is.
    @ @Bs
    Last edited by Mayion; 12-06-2013 at 03:52 PM. Reason: Mentioning member

Similar Threads

  1. Replies: 37
    Last Post: 06-20-2006, 04:24 PM
  2. Pre-Regerstration - E3 Codes
    By Dave84311 in forum WarRock - International Hacks
    Replies: 67
    Last Post: 06-13-2006, 08:06 AM
  3. hi can any1 help me make or find a cheat code
    By CrUsHa in forum WarRock - International Hacks
    Replies: 3
    Last Post: 05-19-2006, 04:39 PM
  4. a Couple WPE Weapon codes?
    By phil823 in forum WarRock - International Hacks
    Replies: 16
    Last Post: 02-10-2006, 02:14 PM