void GetWeird() { Entity[] NearbyEntities = World.GetNearbyEntities(player.Position, 15f); foreach (var e in NearbyEntities) { if (e is Ped && e != player) { // draw every bone EntityBoneCollection ebc = e.Bones; foreach (EntityBone eb in ebc) { Vector3 v = eb.Position; //Vector3 v = Function.Call<Vector3>(Hash.GET_PED_BONE_COORDS, e.Handle, Bone.SkelHead); Vector2 point2D = World3DToScreen2D(v); Function.Call(Hash.DRAW_RECT, point2D.X, point2D.Y, 0.002f, 0.002f * 1.78, 255, 255, 0, 125, false); //World.DrawMarker(MarkerType.DebugSphere, eb.Position, Vector3.Zero, Vector3.Zero, new Vector3(0.25f, 0.25f, 0.25f), Color.Yellow); //Vector2 point = testtest(v); //Function.Call(Hash.DRAW_RECT, point.X, point.Y, 0.002f, 0.002f, 255, 255, 0, 125, false); //main.Sub(point.ToString()); } //Vector3 v = Function.Call<Vector3>(Hash.GET_PED_BONE_COORDS, e.Handle, Bone.SkelHead); //Vector2 point2D; //if (World3DToScreen2D(v, out point2D)) //{ // Function.Call(Hash.DRAW_RECT, point2D.X, point2D.Y, 0.1f, 0.1f, 255, 255, 0, 255, false); //} } } }
public Enumerator(EntityBoneCollection collection) => this._collection = collection;