Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. function revistar(source,cmd,st)
  2. local accountname = getAccountName(getPlayerAccount(source))
  3. if isObjectInACLGroup("user."..accountname, aclGetGroup("ComandosPolicia")) then -- Grupo permitido a usar o comando
  4. for i, p in ipairs(getElementsByType('player')) do
  5. local id = getElementData(source,"ID")
  6. if id == st then
  7. local cx,cy,cz = getElementPosition(p)
  8. local x,y,z = getElementPosition(source)
  9. local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz)
  10. if dist <= 5 then
  11. setPedAnimation( source, "POLICE", "plc_drgbst_01", 3100, true, false, false, false)
  12. triggerClientEvent(source, "REV:TimeEspera", source) -- Chamar evento do client
  13. exports.Scripts_Dxmessages:outputDx(Player_2, "Você está sendo revistado pelo Jogador "..getPlayerName(source).."", "warning")
  14. setTimer ( function()
  15. triggerClientEvent(source, "DNL:Open_Revistar", source, Player_2)
  16. triggerClientEvent(source, "REV:TimeEspera_Close", source) -- Chamar evento do client
  17. end, 3390, 1 )
  18. else
  19. exports.Scripts_Dxmessages:outputDx(source, "Chegue Mais perto para revistar o jogador!", "warning")
  20. end
  21. return
  22. end
  23. outputChatBox ( "#ff0000✘ #ffffffERRO #ff0000✘➺ #ffffff O Jogador(a) Não Foi Encontrado!", source, 255,255,255,true)
  24. end
  25. else
  26. outputChatBox ( "#ff0000✘ #ffffffERRO #ff0000✘➺ #FFFFFFVocê não tem permissão para utilizar este comando!", source, 255,255,255,true)
  27. end
  28. end
  29. addCommandHandler("revistar", revistar)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement