Advertisement
Oreo113

Untitled

Jul 6th, 2024 (edited)
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.32 KB | Gaming | 0 0
  1. @name Radio E2 Follower E2 (By Oreo)
  2. @outputs Mode Counter Max MeS:string
  3. @persist List:array Col Me:entity PLA:entity Commands:table Prefix:string WDJ:entity
  4. runOnTick(1)
  5. runOnChat(1)
  6. if (first()) {
  7. print("{!cyan [R.C.M.D.]} Type !RCMD for a list of all commands.")
  8. Me = owner()
  9. }
  10.  
  11.  
  12. function colorOnCommand(Player:entity, Arguments:array) {
  13. Col = 1
  14.  
  15. function colorOffCommand(Player:entity, Arguments:array) {
  16. Col = 0
  17. }
  18. }
  19.  
  20. A = owner():lastSaid():explode(" ")
  21. # +CommandList
  22. function rcmdCommand(Player:entity, Arguments:array) {
  23. print("{!cyan [R.C.M.D] COMMANDS} ")
  24. print("!Ghost")
  25. print("!Dark")
  26. print("!Hole")
  27. print("!Wire")
  28. print("!ColorOn & !ColorOff (RGB)")
  29. print("!MatOff (Removes Material)")
  30. print("!Remove (Deletes E2)")
  31. }
  32. # -CommandList
  33.  
  34. if (chatClk(owner())) {
  35. # Owner commands
  36. function removeCommand(Player:entity, Arguments:array) {
  37. selfDestruct()
  38. print("{red Chip Removed}")
  39. }
  40. }
  41.  
  42. if ((MeS != "") & (Me:name():lower():find(MeS:lower()) == 0)) {
  43. Me = findPlayerByName(MeS)
  44. }
  45. if (tickClk()) {
  46. findIncludePlayerProps(owner())
  47. findByClass("wdj_radio")
  48.  
  49. if (Max != findToArray():count()) {
  50. List = findToArray()
  51. Max = List:count()
  52. }
  53. Counter++
  54. WDJ = List:entity(Counter)
  55. if (WDJ:mass() != 100000000000) {
  56. WDJ:setMass(100000000000)
  57. }
  58. if (Col) {
  59. WDJ:setColor(randint(255), randint(255), randint(255))
  60. WDJ:setMaterial("models/player/shared/ice_player")
  61. } else {
  62. WDJ:setColor(255, 255, 255)
  63.  
  64.  
  65.  
  66.  
  67.  
  68. function wireCommand(Player:entity, Arguments:array) {
  69. WDJ:setMaterial("models/wireframe")
  70. }
  71. function holeCommand(Player:entity, Arguments:array) {
  72. WDJ:setMaterial("z_easyskins/camo/blackhole")
  73. }
  74. function darkCommand(Player:entity, Arguments:array) {
  75. WDJ:setMaterial("z_easyskins/camo/dark_pulse")
  76. }
  77. function ghostCommand(Player:entity, Arguments:array) {
  78. WDJ:setMaterial("Models/effects/vol_light001")
  79. }
  80. function matOffCommand(Player:entity, Arguments:array) {
  81. WDJ:setMaterial("")
  82.  
  83. }
  84. }
  85. AddCircle = curtime() * 0 + 0 / Max * Counter
  86. CircMult = 0 * Max / pi()
  87. CircZPlus = sin(curtime() * 0 + 0 / Max * Counter) * 0 + 0
  88.  
  89. WDJ:applyForce(((Me:shootPos() + vec(sin(AddCircle) * CircMult, cos(AddCircle) * CircMult, 75 + CircZPlus) - WDJ:pos()) * 7 - WDJ:vel()) * WDJ:mass())
  90. }
  91. if (Counter > Max) {
  92. Counter = 0
  93. }
  94. if (PLA != owner()) {
  95. Version = 1.71
  96. PLA = owner()
  97.  
  98. function exampleCommand(Player:entity, Arguments:array) { # function to be called for the example command
  99. print(format("%s [%s]", Player, Arguments:concat(", ")))
  100. }
  101.  
  102. Prefix = "!"
  103. Commands = table(
  104. "ColorOff" = "colorOffCommand" # when the example command gets run, it call this function
  105. ,"ColorOn" = "colorOnCommand"
  106. ,"Flesh" = "fleshCommand"
  107. ,"Wire" = "wireCommand"
  108. ,"Hole" = "holeCommand" #Oreos Favorite#
  109. ,"Dark" = "darkCommand"
  110. ,"Ghost" = "ghostCommand"
  111. ,"MatOff" = "matOffCommand"
  112. ,"Remove" = "removeCommand"
  113. ,"RCMD" = "rcmdCommand"
  114.  
  115. )
  116. event chat(Player:entity, Message:string, Team:number) {
  117. array(Team) # dispose of the team argument so that we dont get the silly warning
  118. if (Player != owner()) { exit() } # only the owner should be allowed to run the commands
  119.  
  120. local MessagePrefix = Message:sub(1, 1)
  121. if (MessagePrefix != Prefix) { exit() } # If the prefix is not what we expect, stop here
  122. hideChat(1)
  123.  
  124. local Message = Message:sub(2) # Remove the prefix from the message
  125. local Arguments = Message:explode(" ") # Split the command by spaces
  126.  
  127. local Command = Arguments[1, string]
  128. Arguments:remove(1) # remove the initial command so that we just have the rest of the arguments
  129.  
  130. if (Commands:exists(Command)) {
  131. try {
  132. Commands[Command, string](Player, Arguments)
  133. } catch (Error) {
  134. print(format("Failed to run callback '%s'\nError: %s", Command, Error))
  135. }
  136. } else {
  137. print("{red Command not found!}")
  138. }
  139. }
  140.  
  141. }
  142. #Made By Oreo# #Big credit to Meowlan for the help#
  143. #E2 Meant for the wdj_radio addon#
  144.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement