Advertisement
Guest User

Untitled

a guest
Jul 30th, 2018
1,652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. private static Projectile[] test;
  2.  
  3. void Start()
  4. {
  5. InvokeRepeating("yield", 0.1f, 4);
  6. }
  7. void yield()
  8. {
  9. test = UnityEngine.GameObject.FindObjectsOfType<Projectile>();
  10. }
  11. void test1()
  12. {
  13. foreach (Projectile bullet in test)
  14. {
  15. foreach (BasePlayer player in BasePlayer.VisiblePlayerList)
  16. {
  17. if (bullet != null)
  18. {
  19. if (SilentButDeadly.GetData<bool>() && Input.GetKey(KeyCode.F) && !player.IsLocalPlayer() && !player.IsDead() && !player.IsSleeping())
  20. bullet.transform.position = player.model.headBone.position;
  21. }
  22. }
  23. }
  24. }
  25. void OnGUI()
  26. {
  27. if (SilentButDeadly.GetData<bool>())
  28. test1();
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement