function revistar_jogador ( thePlayer, comando, nick )
if nick then
if getPlayerFromPartialName ( nick ) then
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ComandosPolicia") ) then -- Acl Pra Quem Pode Usar o Comando
local player_a_ser_revistado = getPlayerFromPartialName ( nick )
local nick_do_jogador = getPlayerName ( player_a_ser_revistado )
local nick_do_policial = getPlayerName ( thePlayer )
local estrelas_de_procurado = getPlayerWantedLevel ( player_a_ser_revistado )
local policiax, policiay, policiaz = getElementPosition ( thePlayer ) -- Encontrar posição do policial
local revistadox, revistadoy, revistadoz = getElementPosition ( player_a_ser_revistado ) -- Encontrar posição de quem sera revistado
local dist = getDistanceBetweenPoints3D ( policiax, policiay, policiaz, revistadox, revistadoy, revistadoz ) -- Calcular a distancia entre os dois elementos
if ( dist > 5 ) then -- se a distancia for 5 executara a função a seguir
outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Chegue Mais Perto Do Jogador Pra Executar Este Comando!", thePlayer, 255, 255, 255, true) -- Chat Box
elseif ( dist < 4 )then -- Caso ao contrario a distancia for 4 executara a função a seguir
setPedAnimation( thePlayer, "POLICE", "plc_drgbst_01", 3100, true, false, false, false)
outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1O #ff0000Policial #ffffff"..nick_do_policial.." #c1c1c1esta #ff0000Revistando #c1c1c1o #ff0000Suspeito "..nick_do_jogador.."", root, 255, 255, 255, true) -- Chat Box
setTimer ( function()
outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Nivel de #ff0000Procurado #c1c1c1do #ff0000Suspeito#c1c1c1:"..estrelas_de_procurado.."", thePlayer, 255, 255, 255, true) -- Nivel de procurado do jogador
if getElementData(player_a_ser_revistado, "Habilitacoes:Motos") then -- Verifica se ele tem carteira de moto
outputChatBox("Player com carteira de moto", thePlayer, 255, 255, 255, true)
else
outputChatBox("Player sem carteira de moto", thePlayer, 255, 255, 255, true)
end
end, 3390, 1 )
triggerClientEvent(thePlayer, "doShowDXProgressBar", thePlayer) -- Chamar evento do client
end
else
outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Você nao tem permissao a este comando!", thePlayer, 255, 255, 255, true) -- Se voce nao for da acl voce nao tera permissao a este comando
end
end
end
end
addCommandHandler ( "revistar", revistar_jogador )
Só adicionar uma "verificação" abaixo do output do nivel de procurado
Obs: ele vai verificar só de moto, vc tem que fazer o mesmo com a de carro, caminhao e etc.