OldSchoolHack

Registrieren / Anmelden Deutsch

ArmA SDK v0.1.1

not available
  • Kategorie: Sourcecode
  • Entwickler:
  • Hochgeladen von: System
  • Hinzugefügt am:
  • System: Windows
Download (20.54 KB)

VirusTotal Ergebnis: 0/55

virustotal

Beschreibung

First, you need to initialize "main interfaces" (GWorld, GEngine, GNetworkManager, etc):
CPP Code:
  1.  
  2. // Somewhere inside your "main()" function
  3.  
  4. InitIterfaces();
  5.  
After this you get "control" over engine. As an example we obtain the coordinates of objects in 3D space, and convert them to the "real 2D" screen space:
CPP Code:
  1.  
  2. // ===============================================
  3. // Somewhere inside your "DrawObjects()" function
  4. // ===============================================
  5.  
  6. // local player
  7. Object* obj = (Object*)(cameraOn.GetObject());
  8.  
  9. // this SDK don't containt object-iterating method (below is just an example)
  10. for(int i = 0; i < static_cast<int>(entities.size()); i++)
  11. {
  12. if(entities[i].GetObject() != NULL && entities[i].GetObject() != cameraOn.GetObject())
  13. {
  14. // real player, AI, object, etc
  15. Object* target = (Object*)(entities[i].GetObject());
  16.  
  17. Vector3 pos = target->RenderVisualState().Position();
  18.  
  19. Point2DFloat posScr;
  20. bool behindCam = GAbstractUI->WorldToScreen(pos, posScr);
  21.  
  22. if(!behindCam)
  23. GRender.DrawText("TEXT", posScr.x, posScr.y, ...); // your "Text render" function
  24. }
  25. }
  26.  
For calculating distance between you and target use this:
CPP Code:
  1. float dist = obj->FutureVisualState().Position().Distance(pos);
NOTE: for "local player" you have to use "FutureVisualState()" and for other objects "RenderVisualState()". It avoids the appearance of "ESP lagging".

For calculating height and width of the ESP-box you can use this:
CPP Code:
  1. float boxW = (250.0f/dist)/GCamera->Left();
  2. float boxH = (250.0f/dist)/GCamera->Top();
Enough for today. As the availability of free time and the mood I will be supplement "ArmA SDK" with new features. Please don't flaming or flooding on this topic and dont's ask me about any details. Please try to use this information "as is".

[Instructions]
You need to add this VS project to your solution or use this sources as "base" for new project.

[Changelog]
v0.1 (April 22, 2015) – Original release. Only basic functions fot initialization "interfaces", getting object's info (position, name, etc) and manipulating it (some math-functions, WorldToScreen, etc).
v.0.1.1 (April 22, 2015) – Removed some unnecessary files (they will be needed later).

Download ArmA SDK v0.1.1