Advertisement
Rebitaay

Rebitaay's Target Finder E2

May 20th, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.22 KB | None | 0 0
  1. @name Target Finder
  2. @persist Target:entity
  3. @trigger all
  4.  
  5. ######################
  6. ## MADE BY REBITAAY ##
  7. ######################
  8.  
  9. #Dumb shit
  10. runOnTick(1)
  11. runOnChat(1)
  12.  
  13. #Secutity
  14. if(duped()){selfDestructAll()}
  15. if(first()) {
  16.     entity():propNotSolid(1)
  17.     entity():setAlpha(0)
  18. }
  19.  
  20. #Get that motherfucka
  21. if (chatClk(owner())) {
  22.     Cmd = owner():lastSaid():explode(" "):string(1)
  23.     Name = owner():lastSaid():explode(" "):string(2)
  24.    
  25.     if (Cmd == "-t") {
  26.         if (Name) {
  27.             Target = findPlayerByName(Name)
  28.             if (Target) {
  29.                 timer("Target", 1)
  30.                 hint("Target aquired, locking on!",6)
  31.             }
  32.             else {hint("ERROR: Could not locate target!",6)}
  33.         }
  34.     }
  35. }
  36.  
  37. #If you got that motherfucka
  38. if (clk("Target")) {
  39.     holoCreate(1)
  40.     holoModel(1,"hq_cube")
  41.     holoScale(1,vec(1,1,30))
  42.     holoColor(1,vec(255,0,0))
  43.     holoMaterial(1,"models/debug/debugwhite")
  44.     holoParent(1,Target)
  45.     holoPos(1,Target:pos() + vec(0,0,250))
  46.     holoVisible(1,Target,0)
  47. }
  48.  
  49. #When you don't need no motherfucka
  50. if (chatClk(owner())) {
  51.     Cmd = owner():lastSaid():explode(" "):string(1)
  52.     if (Cmd == "-clear") {
  53.         holoDelete(1)
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement