private void FlatSDK_DrawGraphics(object sender, DrawGraphicsEventArgs e) { var gfx = e.Graphics; if (ESPXOptions.bLoadColorsBTN == 1) { loadColorsFromFile(gfx); ESPXOptions.bLoadColorsBTN = 0; } if (ESPXOptions.bSaveBTN == 1) { SerializeStatic.Serialize(typeof(ESPXOptions), "ESPXCFG.xml"); ESPXOptions.bSaveBTN = 0; } if (ESPXOptions.bLoadBTN == 1) { SerializeStatic.Deserialize(typeof(ESPXOptions), "ESPXCFG.xml"); ESPXOptions.bLoadBTN = 0; } LocalPlayer = FlatSDK.GetLocalPlayer(); if (LocalPlayer == null) { return; } if (LocalPlayer.extra == null) { return; } if (entityDrawPositions.Count > 0) { entityDrawPositions.Clear(); } foreach (var entity in listEntityItems) { //var dump = ObjectDumper.Dump(entity.eItem); //var dump = ObjectDumper.Dump(entity); //if (entity.type != 82) { continue; } // Console.Write("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!n"); //Console.Write(dump); // //myarray.Add(entity.eItem.id.ToString() + ":" + entity.eItem.gname.ToString() ); try { DrawItemWeapon(gfx, entity, entity.eItem.id.ToString()); } catch { Console.Write("DrawItemWeapon error\n"); } } }
private static void FlatSDK_DrawGraphics(object sender, DrawGraphicsEventArgs e) { var gfx = e.Graphics; if (ESPOptions.bSaveBTN == 1) { SerializeStatic.Serialize(typeof(ESPOptions), "ESPCFG.xml"); ESPOptions.bSaveBTN = 0; } if (ESPOptions.bLoadBTN == 1) { SerializeStatic.Deserialize(typeof(ESPOptions), "ESPCFG.xml"); ESPOptions.bLoadBTN = 0; } LocalPlayer = FlatSDK.GetLocalPlayer(); if (LocalPlayer == null) { return; } if (LocalPlayer.extra == null) { return; } foreach (var ent in FlatSDK.GetEntities()) { if (ent.type != 82) { continue; } DrawBlip(gfx, ent); } }
private static void FlatSDK_DrawGraphics(object sender, DrawGraphicsEventArgs e) { var gfx = e.Graphics; if (AimOptions.bSaveBTN == 1) { SerializeStatic.Serialize(typeof(AimOptions), "AimCFG.xml"); AimOptions.bSaveBTN = 0; } if (AimOptions.bLoadBTN == 1) { SerializeStatic.Deserialize(typeof(AimOptions), "AimCFG.xml"); AimOptions.bLoadBTN = 0; } LocalPlayer = FlatSDK.GetLocalPlayer(); if (LocalPlayer == null) { return; } if (LocalPlayer.extra == null) { return; } var entList = GetEntitiesAsArray(); var AimTargets = new AimTarget[entList.Length]; float fClosestDist = -1; float ScreenCenterX = FlatSDK.Overlay.Width / 2.0f; float ScreenCenterY = FlatSDK.Overlay.Height / 2.0f; if (AimOptions.bDrawFow == 1) { gfx.DrawCircle(FlatSDKInternal.IRenderer._opakwhite, ScreenCenterX, ScreenCenterY, AimOptions.bFovArray[AimOptions.bFovInt], 2); } for (int i = 0; i < entList.Length; i++) { var current = entList[i]; if (current.type != 82) { continue; } var clampPos = current.HeadBone.position - current.position; bool w2sHead = FlatSDK.WorldToScreen(FlatSDK.Overlay.Width, FlatSDK.Overlay.Height, new Vector3(current.HeadBone.position.X, current.HeadBone.position.Y - (AimOptions.bPredict * 2), current.HeadBone.position.Z - (AimOptions.bYAxis * 8)), out Vector2 HeadPosition); AimTargets[i] = new AimTarget(); AimTargets[i].Screen2D = HeadPosition; AimTargets[i].uniqueID = current.uniqueID; AimTargets[i].CrosshairDistance = Vector2.Distance(HeadPosition, new Vector2(ScreenCenterX, ScreenCenterY)); // isInFov if (BestTargetUniqID == -1) { if (isInside(ScreenCenterX, ScreenCenterY, AimOptions.bFovArray[AimOptions.bFovInt], AimTargets[i].Screen2D.X, AimTargets[i].Screen2D.Y)) { fClosestDist = AimTargets[i].CrosshairDistance; BestTargetUniqID = AimTargets[i].uniqueID; } } //if (BestTargetUniqID == -1) //{ // if (w2sHead) // { // gfx.FillCircle(FlatSDKInternal.IRenderer._opakwhite, HeadPosition.X, HeadPosition.Y, 5); // } //} //else //{ // if (w2sHead) // { // gfx.FillCircle(FlatSDKInternal.IRenderer._red, HeadPosition.X, HeadPosition.Y, 5); // } //} } if (FlatSDK.IsKeyPushedDown(AimOptions.bAimKeys[AimOptions.bAimKeyINT])) { if (BestTargetUniqID != -1) { var best = FindAimTargetByUniqueID(AimTargets, BestTargetUniqID); if (best != null) { // kek { var roundPos = new Vector2((float)Math.Round(best.Screen2D.X), (float)Math.Round(best.Screen2D.Y)); AimAtPosV2(roundPos.X, roundPos.Y, false); } } } } else { BestTargetUniqID = -1; } }