Guest User

Untitled

a guest
Sep 24th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. @name Targetting System
  2. @inputs E:wirelink Shipname:string
  3. @outputs V:vector
  4. @persist Flash:string LastSaid:string Player:entity
  5. @persist Target:string Health PlayerCenter:vector
  6.  
  7. if(first() | duped()){
  8. runOnTick(1)
  9. interval(1000) # makes the e2 run every 1000 ms (1sec)
  10. }
  11.  
  12. H=owner():lastSaid():explode(" ")
  13. if(chatClk(owner()) | first()) { # If the owner talk in the chat then ...
  14. if(H:string(1)=="!t" ) {
  15. TempPlayer=findPlayerByName(H:string(2))
  16. if(TempPlayer:isPlayer()) {
  17. Player=TempPlayer
  18. Target=Player:name()
  19. hideChat(1)
  20. timer("StopHide",10) # it have to set hideChat(0) back :p
  21. }
  22.  
  23. }
  24.  
  25. if(first()) { # It'll start by targetting the owner
  26. Player = owner()
  27. Target = owner():name()
  28. }
  29.  
  30. Health=Player:health()
  31. if(Player:inNoclip()) {Noclip="Yes"}
  32. else {Noclip="No"}
  33.  
  34. TeamName=Player:team():teamName()
  35. LastSaid=Player:lastSaid()
  36. Distance=floor(((entity():pos():distance(Player:pos()))/97)*3.280)
  37. SteamID=Player:steamID()
  38. }
  39.  
  40. if(first()) { #if it is the first execution ... then it'll create all the objects
  41. runOnChat(1) # someone wrote something in the chat
  42. runOnTick(1)
  43.  
  44. E:egpText(8, "Target: " + Target, vec2(32,65))
  45. E:egpText(9, "Health: " + Health, vec2(0,14))
  46. E:egpText(10, "Noclipping?: " + Noclip, vec2(0,98))
  47. E:egpText(11, "Distance (ft): " + Distance, vec2(0,140))
  48. E:egpText(12, "Last Said: " + LastSaid, vec2(0,154))
  49. E:egpText(13, "Team: " + TeamName, vec2(0,170))
  50. E:egpText(14, "SteamID: " + SteamID, vec2(0,182))
  51.  
  52. E:egpColor(8,vec4(0,0,0,255))
  53. E:egpColor(9,vec4(0,0,0,255))
  54. E:egpColor(10,vec4(0,0,0,255))
  55. E:egpColor(11,vec4(0,0,0,255))
  56. E:egpColor(12,vec4(0,0,0,255))
  57. E:egpColor(13,vec4(0,0,0,255))
  58. E:egpColor(14,vec4(0,0,0,255))
  59. }
  60.  
  61. if(clk("StopHide")) {
  62. hideChat(0)
  63. }
  64. if(tickClk()) {
  65. PlayerCenter=Player:toWorld(Player:boxCenter())
  66. V = PlayerCenter
  67.  
  68. }
  69.  
  70. if(first() | duped()){
  71. E:egpBox(1,vec2(256,256),vec2(512,512))
  72. E:egpColor(1,vec4(0,0,0,255))
  73.  
  74. E:egpRoundedBox(2,vec2(256,256),vec2(490,490))
  75. E:egpColor(2,vec4(255,255,255,255))
  76.  
  77. E:egpRoundedBox(3,vec2(256,23),vec2(460,40))
  78. E:egpColor(3,vec4(50,150,0,255))
  79.  
  80. E:egpText(4,"Targetting Console",vec2(140,5))
  81. E:egpColor(4,vec4(0,0,0,255))
  82. E:egpFont(4, "CoolVetica", 35 )
  83.  
  84. E:egpText(5,Shipname,vec2(30,44))
  85. E:egpColor(5,vec4(0,0,0,255))
  86. E:egpFont(5,"Arial",18)
  87.  
  88. E:egpText(6,"Made by DeadMeerkat",vec2(20,485))
  89. E:egpColor(6,vec4(0,0,0,0))
  90. E:egpFont(6, "Arial", 20 )
  91.  
  92. E:egpBoxOutline(7,vec2(128,75),vec2(220,25))
  93. E:egpColor(7,vec4(0,0,0,255))
  94. }
Add Comment
Please, Sign In to add comment