public static void DoSilentAimbot() { try { if (aimPlayer) { //Debug.LogError(LocalPlayer.Entity.GetHeldEntity().GetType().ToString()); BaseProjectile baseProjectile = LocalPlayer.Entity.GetHeldEntity() as BaseProjectile; if (baseProjectile) { foreach (Projectile projectile in baseProjectile.GetFieldValue("createdProjectiles") as List <Projectile> ) { Debug.LogError(projectile.projectileID); } } } } catch (Exception e) { Debug.LogException(e); } }
private void OnGUI() { // foreach (BaseNetworkable NetworkableObject in BaseNetworkable.clientEntities) // { // if (NetworkableObject is OreResourceEntity) // { // ResourceEntity resource = NetworkableObject as OreResourceEntity; // if (resource != null) // { // Vector3 vector = MainCamera.mainCamera.WorldToScreenPoint(resource.transform.position); // if (vector.z > 0f) // { // int distance = (int)Vector3.Distance(LocalPlayer.Entity.transform.position, // resource.transform.position); // if (distance <= 5000) // { // vector.x += 3f; // vector.y = Screen.height - (vector.y + 1f); // Renderer.DrawString(new Vector2(vector.x, vector.y), // string.Format("{0} [{1}m]", // resource.ShortPrefabName // .Replace(".prefab", "") // .Replace("_deployed", "") // , distance), // Color.green, true, 12, true); // } // } // } // } // } Renderer.DrawString(new Vector2(100f, 100f), (aimPlayer == null ? "Null" : aimPlayer.displayName), Color.red); if (LocalPlayer.Entity) { BaseProjectile baseProjectile = LocalPlayer.Entity.GetHeldEntity() as BaseProjectile; if (baseProjectile) { Renderer.DrawString(new Vector2(100f, 125f), (baseProjectile.GetFieldValue("createdProjectiles") == null ? "NULL" : "NOT NULL"), Color.red); Renderer.DrawString(new Vector2(100f, 150f), SilentAimbot.aimbotProjectiles.Count.ToString(), Color.red); //Debug.LogError((baseProjectile.GetFieldValue("createdProjectiles") == null ? "NULL" : "NOT NULL")); //foreach (Projectile projectile in baseProjectile.GetFieldValue("createdProjectiles") as List<Projectile>) //{ // Debug.LogError(projectile.projectileID); //} } } if (aimPlayer != null) { if (bAimbotEnabled && LocalPlayer.Entity != null && Input.GetKey(kAimKey)) { IsAiming = true; DoAimbot(); } else { IsAiming = false; } } else { IsAiming = false; } }
public static bool HasAttackCooldown(BaseProjectile baseProjectile) { //Debug.LogError((float)baseProjectile.GetFieldValue("nextAttackTime")); return(Time.time < (float)baseProjectile.GetFieldValue("nextAttackTime")); }