Advertisement
Rebitaay

Untitled

Jul 13th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.94 KB | None | 0 0
  1. if (chatClk(owner())) {  #If the E2 Owner says something in chat, proceed
  2.     Cmd = owner():lastSaid():explode(" "):string(1)  #"Cmd" is now a shortcut for the FIRST word of the owner's message
  3.     Name = owner():lastSaid():explode(" "):string(2)  #"Name" is now a shortcut for the SECOND word of the owner's message
  4.    
  5.     if (Cmd == "-t") {  #If the first word was "-t", proceed
  6.         if (Name) {  #If there was a second word, proceed
  7.             Target = findPlayerByName(Name)  #Find a player by name, using the second word as the keyword
  8.             if (Target) {  #If it found a player by that name, proceed
  9.                 timer("Target", 1)  #I don't remember why this was needed
  10.                 hint("Target aquired, locking on!",6)  #Displays a message in bottom-right
  11.             }
  12.             else {hint("ERROR: Could not locate target!",6)}  #If no target was found using the keyword, display error in bottom-right
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement