Clotic

JumpToTarget

Jul 4th, 2020
1,630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local MSG_TJ = "#tj"
  2.  
  3. local function TargetJump(event, player, msg, Type, lang)
  4.     selectTarget = player:GetSelection()
  5.     if (not selectTarget) then
  6.         selectTarget = player
  7.     end
  8.  
  9.     gmRank = player:GetGMRank()
  10.     if (gmRank >= 3) then -- change number (0-3) 0 - to all  1,2,3 GM with rank
  11.         msg = msg:lower()
  12.         if (msg == MSG_TJ) then
  13.             x = selectTarget:GetX()
  14.             y = selectTarget:GetY()
  15.             z = selectTarget:GetZ()
  16.             player:MoveJump(x, y, z, 20, 25, 0)
  17.         end
  18.     end
  19. end
  20.  
  21. RegisterPlayerEvent(18, TargetJump)
Advertisement
Add Comment
Please, Sign In to add comment