virgingod Posted February 21, 2020 Share Posted February 21, 2020 (edited) Estou adaptando um script para checar varias categorias de carteira, em teoria está funcionando, mas está sempre retornando os meus valores, e não os da pessoa checada, até encontrei o ERRO, estava utilizando "Source" que seria da pessoa que digitou, mas tentei usar o Cliente que esta em todo o script e mesmo assim não funcionou. Script que "deu certo" Spoiler -- Server-Side function VCNH() if getElementData(source, "DNL:TestePratico", true ) then return end if getElementData(source, "DNL:Categoria(A)", true) then local moto = "Moto" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(A)", false) then local moto = "Moto Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(B)", true) then local carros = "Carro" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(B)", true) then local carros = "Carro Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(C)", true) then local caminhao = "Caminhão" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(C)", true) then local caminhao = "Caminhão Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(D)", true) then local carreta = "Carreta" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(D)", true) then local carreta = "Carreta Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) end end addEvent ( "L:VCNH", true) addEventHandler ( "L:VCNH", root, VCNH ) Script completo Spoiler -- LG7 Scripter - Não remova os créditos por favor! -- Acesse meu canal e tenha mais conteúdos como esse: -- https://www.youtube.com/c/LG7MTA -- Tenha um(a) bom(a) Dia/Tarde/Noite function AbrirPainel(source,cmd,pname) local accName = getAccountName ( getPlayerAccount ( source ) ) local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policial" ) ) then cliente = getPlayerFromPartialName(pname) or getPlayerFromID(pname) if isElement(cliente) then if dist <= 7 then local PegarId = getPlayerFromID(cliente) local PegarNick = getPlayerName(cliente) local PegarNome = getElementData(cliente, "AirNew_RG_NomeCompleto") or "N/A" local PegarSobrenome = getElementData(cliente, "AirNew_RG_Sobrenome") or "N/A" local Idade = getElementData(cliente, "AirNew_RG_Idade") or "N/A" local Peso = getElementData(cliente, "Peso") or "70Kg" local Altura = getElementData(cliente, "Altura") or "1,70m" local Sexo = getElementData(cliente, "Sexo") or "Masculino" local Porte = getElementData(cliente, "AirNewSCR_Porte_de_Armas") or "Não possui" local Wanted = getPlayerWantedLevel(cliente) local Dinheiro = getPlayerMoney(cliente) local Level = getElementData(cliente, "Level") or "0" local ID = getElementData(cliente, "ID") or "N/A" local DinheiroSujo =getElementData(cliente, "moneysujo") or "0" setElementData(source, "Suspeito:ID", PegarId) setElementData(source, "Suspeito:Nick", PegarNick) setElementData(source, "Suspeito:AirNew_RG_NomeCompleto",PegarNome) setElementData(source, "Suspeito:AirNew_RG_Sobrenome",PegarSobrenome) setElementData(source, "Suspeito:AirNew_RG_Idade",Idade) setElementData(source, "Suspeito:Peso",Peso) setElementData(source, "Suspeito:Altura",Altura) setElementData(source, "Suspeito:Sexo",Sexo) setElementData(source, "Suspeito:AirNewSCR_Porte_de_Armas",Porte) setElementData(source, "Suspeito:Wanted",Wanted) setElementData(source, "Suspeito:Dinheiro",Dinheiro) setElementData(source, "Suspeito:Level",Level) setElementData(source, "Suspeito:ID",ID) setElementData(source, "Suspeito:moneysujo", DinheiroSujo) setElementData(source, "L:IDRevistado", PegarId) triggerClientEvent(source, "L:Iniciou_Comando", source) else outputChatBox("#0064c8» #ffffffEsse jogador está muito longe.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffEsse jogador não existe ou está offiline.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffVocê não tem permissão para esse comando.",source,255,255,255,true) end end addCommandHandler("v",AbrirPainel) function VCNH() --local CNH = getElementData(source, "DNL:Categoria(A)") --outputConsole(CNH) if getElementData(source, "DNL:TestePratico", true ) then return end if getElementData(source, "DNL:Categoria(A)", true) then local moto = "Moto" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(A)", false) then local moto = "Moto Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(B)", true) then local carros = "Carro" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(B)", true) then local carros = "Carro Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(C)", true) then local caminhao = "Caminhão" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(C)", true) then local caminhao = "Caminhão Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(D)", true) then local carreta = "Carreta" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(D)", true) then local carreta = "Carreta Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) end if getElementData(source, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) elseif getElementData(source, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) end --else CNH = " false" then --local CNHN = ("Não Possui") --outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..CNHN, source, 255,255,255,true) end addEvent ( "L:VCNH", true) addEventHandler ( "L:VCNH", root, VCNH ) function VMultar() local Valor = getElementData(source,"L:ValorMulta") or 0 local Motivo = getElementData(source, "L:MotivoMulta") or "erro" outputChatBox("#0064c8»#ffffff Você multou o jogador #0064c8"..getPlayerName(cliente).."#ffffff por #0064c8$"..Valor.."#ffffff pelo motivo #0064c8".. Motivo, source, 255,255,255,true) outputChatBox("#0064c8»#ffffff O Polícial #0064c8"..getPlayerName(source).."#ffffff te multou por #0064c8$"..Valor.."#ffffff pelo motivo #0064c8"..Motivo, cliente, 255,255,255,true) takePlayerMoney(cliente,Valor) end addEvent ( "L:MultouJogador", true) addEventHandler ( "L:MultouJogador", root, VMultar ) algemar = false function VAlgemar2() local algemado = getElementData(cliente,"algemado") or false if algemado == false then setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) -- Animação de algemar setElementFrozen( cliente, true ) -- Freezar jogador setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) toggleControl(cliente, "fire", false) -- retirar função de atirar setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) setElementData(cliente,"algemado",true) else setPedAnimation( cliente) -- Animação de algemar setElementFrozen( cliente, false ) -- Freezar jogador toggleControl(cliente, "fire", true) -- retirar função de atirar setElementData(cliente,"algemado",false) end end addEvent ( "L:VAlgemar", true) addEventHandler ( "L:VAlgemar", root, VAlgemar2 ) function VRevistar() local Drogas = getElementData(cliente, "L:Maconhas") or 0 outputChatBox ( "#0064c8» #ffffffDrogas do jogador:#0064c8 "..Drogas, source, 255, 255, 255, true ) outputChatBox ( "#0064c8» #ffffffArmas do jogador:", source, 255, 255, 255, true ) for slot = 0, 12 do local Armas = getPedWeapon ( cliente, slot ) local Municao = getPedTotalAmmo ( cliente, slot ) if Armas > 0 then if Municao > 0 then weapon_nome = getWeaponNameFromID ( Armas ) outputChatBox ( "#0064c8» #ffffff"..weapon_nome.." #0064c8- #ffffff"..Municao.." Bala(s)!", source, 255, 255, 255, true ) end end end end addEvent ( "L:VRevistar", true) addEventHandler ( "L:VRevistar", root, VRevistar ) function VDrogas() local Drogas = getElementData(cliente, "L:Maconhas") or 0 if Drogas > 0 then outputChatBox ( "#0064c8» #ffffffVocê prendeu #0064c8"..Drogas.."#ffffff do suspeito.", source, 255, 255, 255, true ) setElementData(cliente,"L:Maconhas",0) outputChatBox("Você abriu Drogas", source, 255,255,255) else outputChatBox ( "#0064c8» #ffffffEsse jogador não possui drogas.", source, 255, 255, 255, true ) end end addEvent ( "L:VDrogas", true) addEventHandler ( "L:VDrogas", root, VDrogas ) function VArmas() takeAllWeapons (cliente) outputChatBox ( "#0064c8» #ffffffVocê prendeu todas as armas do suspeito.", source, 255, 255, 255, true ) end addEvent ( "L:VArmas", true) addEventHandler ( "L:VArmas", root, VArmas ) ultimovei = false function verificarV(thePlayer) theVehicle = getPedOccupiedVehicle ( thePlayer ) local id = getElementModel ( theVehicle ) if id == 596 or id == 490 then ultimovei = true else ultimovei = false end end addEventHandler("onVehicleEnter",root,verificarV) function VPrender() local Preso = getElementData(cliente, "IndoPreso") or false if ultimovei == true then if Preso == false then attachElements (cliente,theVehicle, 0, -1.7, 0.7 ) setPedAnimation( cliente, "CRACK", "crckidle3", -1, true, false, false, false) -- Animação de algemar setElementData(cliente, "IndoPreso",true) else detachElements(cliente,theVehicle,0,2,0) setPedAnimation(cliente) setElementData(cliente,"IndoPreso",false) end else outputChatBox("#0064c8» #ffffffSeu ultimo veículo tem que ser um carro da polícia.",source,255,255,255,true) end end addEvent ( "L:VPrender", true) addEventHandler ( "L:VPrender", root, VPrender ) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function getPlayerFromID ( id ) for k, player in ipairs ( getElementsByType ( "player" ) ) do local p_id = getElementData ( player, "ID" ) if ( p_id == tonumber(id) ) then player_n = getPlayerName ( player ) return player, player_n end end end Edited February 21, 2020 by Breevz Link to comment
Tommy. Posted February 21, 2020 Share Posted February 21, 2020 Eu sei o que é, mas está tão bagunçado e confuso que fica dificil te ajudar. Mas simplesmente no getElementData aonde pega a habilitação do player, você tem que trocar o elemento source(você) e colocar o elemento do player que vai checar Link to comment
virgingod Posted February 21, 2020 Author Share Posted February 21, 2020 3 minutes ago, Tommy. said: Eu sei o que é, mas está tão bagunçado e confuso que fica dificil te ajudar. Mas simplesmente no getElementData aonde pega a habilitação do player, você tem que trocar o elemento source(você) e colocar o elemento do player que vai checar Eu comentei isso no começo, só não consigo achar algum argumento para o player checado, os que uso e já são usados no script não funciona Link to comment
Angelo Pereira Posted February 21, 2020 Share Posted February 21, 2020 (edited) 43 minutes ago, Tommy. said: Eu sei o que é, mas está tão bagunçado e confuso que fica dificil te ajudar. Mas simplesmente no getElementData aonde pega a habilitação do player, você tem que trocar o elemento source(você) e colocar o elemento do player que vai checar Concordamos hehe Eu ainda não entendi, mas, ele quer checar a categorias de um jogador? Se for, do jeito que fez, apenas vai pegar o da pessoa que fazer esse evento. agora, se quer adicionar, isso ao comando "v", é + fácil. Agora, saber como você quer adaptar fica difícil saber o que realmente está tentando fazer. Mas, como mencionei, se for querer adicionar isso ao comando "v", séria mais fácil, eu apenas darei um exemplo do jeito que já esta. function AbrirPainel(source,cmd,pname) local accName = getAccountName ( getPlayerAccount ( source ) ) local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policial" ) ) then cliente = getPlayerFromPartialName(pname) or getPlayerFromID(pname) if isElement(cliente) then if dist <= 7 then local PegarId = getPlayerFromID(cliente) local PegarNick = getPlayerName(cliente) local PegarNome = getElementData(cliente, "AirNew_RG_NomeCompleto") or "N/A" local PegarSobrenome = getElementData(cliente, "AirNew_RG_Sobrenome") or "N/A" local Idade = getElementData(cliente, "AirNew_RG_Idade") or "N/A" local Peso = getElementData(cliente, "Peso") or "70Kg" local Altura = getElementData(cliente, "Altura") or "1,70m" local Sexo = getElementData(cliente, "Sexo") or "Masculino" local Porte = getElementData(cliente, "AirNewSCR_Porte_de_Armas") or "Não possui" local Wanted = getPlayerWantedLevel(cliente) local Dinheiro = getPlayerMoney(cliente) local Level = getElementData(cliente, "Level") or "0" local ID = getElementData(cliente, "ID") or "N/A" local DinheiroSujo =getElementData(cliente, "moneysujo") or "0" VCNH(cliente) --/> Adicionado. setElementData(source, "Suspeito:ID", PegarId) setElementData(source, "Suspeito:Nick", PegarNick) setElementData(source, "Suspeito:AirNew_RG_NomeCompleto",PegarNome) setElementData(source, "Suspeito:AirNew_RG_Sobrenome",PegarSobrenome) setElementData(source, "Suspeito:AirNew_RG_Idade",Idade) setElementData(source, "Suspeito:Peso",Peso) setElementData(source, "Suspeito:Altura",Altura) setElementData(source, "Suspeito:Sexo",Sexo) setElementData(source, "Suspeito:AirNewSCR_Porte_de_Armas",Porte) setElementData(source, "Suspeito:Wanted",Wanted) setElementData(source, "Suspeito:Dinheiro",Dinheiro) setElementData(source, "Suspeito:Level",Level) setElementData(source, "Suspeito:ID",ID) setElementData(source, "Suspeito:moneysujo", DinheiroSujo) setElementData(source, "L:IDRevistado", PegarId) triggerClientEvent(source, "L:Iniciou_Comando", source) else outputChatBox("#0064c8» #ffffffEsse jogador está muito longe.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffEsse jogador não existe ou está offiline.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffVocê não tem permissão para esse comando.",source,255,255,255,true) end end addCommandHandler("v",AbrirPainel) function VCNH( cliente ) --local CNH = getElementData(source, "DNL:Categoria(A)") --outputConsole(CNH) if getElementData(cliente, "DNL:TestePratico", true ) then return end if getElementData(cliente, "DNL:Categoria(A)", true) then local moto = "Moto" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(A)", false) then local moto = "Moto Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) end --else CNH = " false" then --local CNHN = ("Não Possui") --outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..CNHN, source, 255,255,255,true) end --addEvent ( "L:VCNH", true) --addEventHandler ( "L:VCNH", root, VCNH ) Agora, se você esta tentando usar um trigger do client, para o server-side, você vai te que obter este player no client, mas, do jeito que esta ai, não funcionará ou então faça : linha : -- server-side / comando "v" / enviar o player revistado para o client-side triggerClientEvent(source, "L:Iniciou_Comando", source, cliente) --/> Enviar o Player Junto Para o Client local player_revistado = "" function exemplo1(cliente) player_revistado = cliente -- end addEvent("L:Iniciou_Comando", true) addEventHandler("L:Iniciou_Comando", getRootElement(), exemplo1) --/> Função que você esteja tentando executa ao clicar no botão para saber sua categorias function check_categoria () triggerServerEvent("L:VCNH", localPlayer, player_revistado ) end --/> Então no server-side dará certo dessa x function VCNH( cliente ) --local CNH = getElementData(source, "DNL:Categoria(A)") --outputConsole(CNH) if getElementData(cliente, "DNL:TestePratico", true ) then return end if getElementData(cliente, "DNL:Categoria(A)", true) then local moto = "Moto" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(A)", false) then local moto = "Moto Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) end --else CNH = " false" then --local CNHN = ("Não Possui") --outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..CNHN, source, 255,255,255,true) end addEvent ( "L:VCNH", true) addEventHandler ( "L:VCNH", root, VCNH ) Caso precisar, faça uma verificação utilizando "getPlayerFromPartialName(cliente)", dessa forma, dará certo, porem só com o player que revista Edited February 21, 2020 by Angelo Pereira Link to comment
virgingod Posted February 21, 2020 Author Share Posted February 21, 2020 19 minutes ago, Angelo Pereira said: Concordamos hehe -- Alem de eu não saber ajeitar os scripts ainda, é um script que peguei da net :X Eu ainda não entendi, mas, ele quer checar a categorias de um jogador? -- Isso, quero checar a categoria do jogador revistado, que no caso seria o /v ID/Nick Da primeira forma que tu me passou, funcionou, porem ela aparece sempre que eu digito o comando /v, gostaria que fosse apenas quando eu apertasse no menu para checar a CNH (Imagem), alem do mais, a mensagem ta aparecendo para todo o servidor. Codigo Client Side (Inteiro) Spoiler -- LG7 Scripter - Não remova os créditos por favor! -- Acesse meu canal e tenha mais conteúdos como esse: -- https://www.youtube.com/c/LG7MTA -- Tenha um(a) bom(a) Dia/Tarde/Noite local screenW, screenH = guiGetScreenSize() local resW, resH = 1366, 768 local x, y = (screenW/resW), (screenH/resH) Painel = false Identidade = false function DxRevistar() local IdRevistado = getElementData(localPlayer, "Suspeito:Nick") or "N/A" dxDrawLine((screenW * 0.3602) - 1, (screenH * 0.3008) - 1, (screenW * 0.3602) - 1, screenH * 0.7292, tocolor(0, 100, 200, 255), 1, false) dxDrawLine(screenW * 0.5256, (screenH * 0.3008) - 1, (screenW * 0.3602) - 1, (screenH * 0.3008) - 1, tocolor(0, 100, 200, 255), 1, false) dxDrawLine((screenW * 0.3602) - 1, screenH * 0.7292, screenW * 0.5256, screenH * 0.7292, tocolor(0, 100, 200, 255), 1, false) dxDrawLine(screenW * 0.5256, screenH * 0.7292, screenW * 0.5256, (screenH * 0.3008) - 1, tocolor(0, 100, 200, 255), 1, false) dxDrawRectangle(screenW * 0.3602, screenH * 0.3008, screenW * 0.1654, screenH * 0.4284, tocolor(47, 47, 47, 255), false) dxDrawText("Nome: #0064c8"..IdRevistado, screenW * 0.3624, screenH * 0.3086, screenW * 0.5227, screenH * 0.3385, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "center", false, false, false, true, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.3516, screenW * 0.1603, screenH * 0.0391, Cor1, false) dxDrawText("Identidade", screenW * 0.4056, screenH * 0.3516, screenW * 0.4802, screenH * 0.3906, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.3958, screenW * 0.1603, screenH * 0.0391, Cor2, false) dxDrawText("Checar CNH", screenW * 0.4056, screenH * 0.3958, screenW * 0.4802, screenH * 0.4349, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.4414, screenW * 0.1603, screenH * 0.0391, Cor3, false) dxDrawText("Multar", screenW * 0.4056, screenH * 0.4414, screenW * 0.4802, screenH * 0.4805, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.4870, screenW * 0.1603, screenH * 0.0391, Cor4, false) dxDrawText("Algemar", screenW * 0.4056, screenH * 0.4870, screenW * 0.4802, screenH * 0.5260, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.5313, screenW * 0.1603, screenH * 0.0391, Cor5, false) dxDrawText("Revistar", screenW * 0.4056, screenH * 0.5313, screenW * 0.4802, screenH * 0.5703, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.5768, screenW * 0.1603, screenH * 0.0391, Cor6, false) dxDrawText("Apreender drogas", screenW * 0.4056, screenH * 0.5768, screenW * 0.4802, screenH * 0.6159, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.6224, screenW * 0.1603, screenH * 0.0391, Cor7, false) dxDrawText("Apreender armas", screenW * 0.4056, screenH * 0.6224, screenW * 0.4802, screenH * 0.6615, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.6693, screenW * 0.1603, screenH * 0.0391, Cor8, false) dxDrawText("Prender", screenW * 0.4056, screenH * 0.6693, screenW * 0.4802, screenH * 0.7083, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.5183, screenH * 0.3516, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.3958, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.4414, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.4870, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.5313, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.5768, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.6224, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.6693, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) Cor1 = tocolor(30, 30, 30, 255) Cor2 = tocolor(30, 30, 30, 255) Cor3 = tocolor(30, 30, 30, 255) Cor4 = tocolor(30, 30, 30, 255) Cor5 = tocolor(30, 30, 30, 255) Cor6 = tocolor(30, 30, 30, 255) Cor7 = tocolor(30, 30, 30, 255) Cor8 = tocolor(30, 30, 30, 255) if isCursorOnElement(screenW * 0.3624, screenH * 0.3516, screenW * 0.1603, screenH * 0.0391) then Cor1 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.3958, screenW * 0.1603, screenH * 0.0391) then Cor2 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.4414, screenW * 0.1603, screenH * 0.0391) then Cor3 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.4870, screenW * 0.1603, screenH * 0.0391) then Cor4 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.5313, screenW * 0.1603, screenH * 0.0391) then Cor5 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.5768, screenW * 0.1603, screenH * 0.0391) then Cor6 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.6224, screenW * 0.1603, screenH * 0.0391) then Cor7 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.6693, screenW * 0.1603, screenH * 0.0391) then Cor8 = tocolor(0, 100, 200, 255) end end function AbrirPainel() if Identidade == false then if VMultar == false then if (Painel) then removeEventHandler("onClientRender",root,DxRevistar) Painel = false showCursor(false) else addEventHandler("onClientRender",root,DxRevistar) Painel = true showCursor(true) end end end end addEvent ( "L:Iniciou_Comando", true) addEventHandler ( "L:Iniciou_Comando", root, AbrirPainel ) VMultar = false function DxIdentidade() local Nick =getElementData(localPlayer, "Suspeito:Nick" ) or "N/A" local Nome =getElementData(localPlayer, "Suspeito:AirNew_RG_NomeCompleto")or "N/A" local Sobrenome =getElementData(localPlayer, "Suspeito:AirNew_RG_Sobrenome")or "N/A" local Idade =getElementData(localPlayer, "Suspeito:AirNew_RG_Idade")or "N/A" local Peso =getElementData(localPlayer, "Suspeito:Peso")or "80 Kg" local Altura =getElementData(localPlayer, "Suspeito:Altura")or "1,72m" local Sexo =getElementData(localPlayer, "Suspeito:Sexo")or "Masculino" local Porte =getElementData(localPlayer, "Suspeito:AirNewSCR_Porte_de_Armas")or "Não possui" local Wanted = getElementData(localPlayer, "Suspeito:Wanted")or "N/A" local Dinheiro =getElementData(localPlayer, "Suspeito:Dinheiro")or "N/A" local Level =getElementData(localPlayer, "Suspeito:Level")or "N/A" local ID = getElementData(localPlayer, "ID") or "N/A" local DinheiroSujo =getElementData(localPlayer, "Suspeito:moneysujo") or "0" dxDrawRectangle(screenW * 0.4114, screenH * 0.3216, screenW * 0.2584, screenH * 0.3099, tocolor(47, 47, 47, 255), false) dxDrawText("<", screenW * 0.4114, screenH * 0.3242, screenW * 0.4275, screenH * 0.3529, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Nome:", screenW * 0.4290, screenH * 0.3659, screenW * 0.4810, screenH * 0.3815, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Idade:", screenW * 0.4290, screenH * 0.3945, screenW * 0.4810, screenH * 0.4102, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Peso:", screenW * 0.4290, screenH * 0.4232, screenW * 0.4810, screenH * 0.4388, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Altura:", screenW * 0.4290, screenH * 0.4518, screenW * 0.4810, screenH * 0.4674, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Sexo:", screenW * 0.4290, screenH * 0.4805, screenW * 0.4810, screenH * 0.4961, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("ID: ", screenW * 0.4290, screenH * 0.5091, screenW * 0.4810, screenH * 0.5247, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Level:", screenW * 0.4290, screenH * 0.5378, screenW * 0.4810, screenH * 0.5534, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Porte de Armas:", screenW * 0.4290, screenH * 0.5664, screenW * 0.4810, screenH * 0.5820, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, true, false, false) dxDrawText("Nível de procurado:", screenW * 0.4290, screenH * 0.5951, screenW * 0.4810, screenH * 0.6107, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, true, false, false) dxDrawText("Dinheiro Limpo:", screenW * 0.5198, screenH * 0.3945, screenW * 0.5717, screenH * 0.4102, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Dinheiro Sujo:", screenW * 0.5198, screenH * 0.4258, screenW * 0.5717, screenH * 0.4414, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Nome.." "..Sobrenome, screenW * 0.4634, screenH * 0.3659, screenW * 0.6603, screenH * 0.3815, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Idade, screenW * 0.4605, screenH * 0.3945, screenW * 0.5124, screenH * 0.4102, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Peso, screenW * 0.4605, screenH * 0.4232, screenW * 0.5124, screenH * 0.4388, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Altura, screenW * 0.4634, screenH * 0.4518, screenW * 0.5124, screenH * 0.4674, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Sexo, screenW * 0.4597, screenH * 0.4805, screenW * 0.5124, screenH * 0.4961, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(ID, screenW * 0.4451, screenH * 0.5091, screenW * 0.4978, screenH * 0.5247, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Level, screenW * 0.4627, screenH * 0.5378, screenW * 0.5154, screenH * 0.5534, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Porte, screenW * 0.5081, screenH * 0.5664, screenW * 0.5608, screenH * 0.5820, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Wanted, screenW * 0.5227, screenH * 0.5951, screenW * 0.5754, screenH * 0.6107, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("R$ "..Dinheiro, screenW * 0.5966, screenH * 0.3945, screenW * 0.6493, screenH * 0.4102, tocolor(97, 255, 101, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("R$ "..DinheiroSujo, screenW * 0.5893, screenH * 0.4258, screenW * 0.6420, screenH * 0.4414, tocolor(255, 79, 79, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Identidade", screenW * 0.4693, screenH * 0.3281, screenW * 0.6237, screenH * 0.3529, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end MotivoMulta = guiCreateEdit(x*595, y*302, x*178, y*23, "", false) guiSetAlpha ( MotivoMulta, 0.85 ) guiEditSetMaxLength ( MotivoMulta, 100) guiSetVisible ( MotivoMulta, false ) ValorMulta = guiCreateEdit(x*596, y*330, x*178, y*23, "", false) guiSetAlpha ( ValorMulta, 0.85 ) guiEditSetMaxLength ( ValorMulta, 100) guiSetVisible ( ValorMulta, false ) local bmotivo = guiCreateButton(screenW * 0.4107, screenH * 0.4805, screenW * 0.1413, screenH * 0.0299,"",false) guiSetAlpha(bmotivo,0) local bfechar = guiCreateButton(screenW * 0.4107, screenH * 0.5130, screenW * 0.1413, screenH * 0.0299,"",false) guiSetAlpha(bfechar,0) addEventHandler("onClientGUIClick",bmotivo, function () if VMultar == true then local motivo = guiGetText(MotivoMulta) local valor = guiGetText(ValorMulta) setElementData(localPlayer,"L:MotivoMulta",motivo) setElementData(localPlayer,"L:ValorMulta",valor) triggerServerEvent("L:MultouJogador",localPlayer) end end) addEventHandler("onClientGUIClick",bfechar, function () if VMultar == true then removeEventHandler("onClientRender", root, darmulta) VMultar = false showCursor(false) guiSetVisible ( MotivoMulta, false ) guiSetVisible ( ValorMulta, false ) AbrirPainelS() end end) local screenW, screenH = guiGetScreenSize() function darmulta() dxDrawRectangle(screenW * 0.3895, screenH * 0.3620, screenW * 0.1867, screenH * 0.2031, tocolor(27, 27, 27, 255), false) dxDrawText("MULTAR", screenW * 0.3902, screenH * 0.3633, screenW * 0.5761, screenH * 0.3828, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("MOTIVO:", screenW * 0.3895, screenH * 0.3958, screenW * 0.4363, screenH * 0.4232, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("VALOR:", screenW * 0.3895, screenH * 0.4297, screenW * 0.4363, screenH * 0.4570, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.4107, screenH * 0.4805, screenW * 0.1413, screenH * 0.0299, mul1, false) dxDrawText("MULTAR", screenW * 0.4107, screenH * 0.4805, screenW * 0.5520, screenH * 0.5104, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.4107, screenH * 0.5130, screenW * 0.1413, screenH * 0.0299, mul2, false) dxDrawText("VOLTAR", screenW * 0.4107, screenH * 0.5130, screenW * 0.5520, screenH * 0.5430, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) mul1 =tocolor(0, 0, 1, 255) mul2 = tocolor(0, 0, 1, 255) if isCursorOnElement(screenW * 0.4107, screenH * 0.4805, screenW * 0.1413, screenH * 0.0299) then mul1 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.4107, screenH * 0.5130, screenW * 0.1413, screenH * 0.0299) then mul2 = tocolor(0, 100, 200, 255) end end function FecharPainelS() removeEventHandler("onClientRender",root,DxRevistar) Painel = false showCursor(false) end function AbrirPainelS() addEventHandler("onClientRender",root,DxRevistar) Painel = true showCursor(true) end function ClicarIdentidade (_,state) if Identidade == true then if state == "down" then if isCursorOnElement (screenW * 0.4114, screenH * 0.3242, screenW * 0.4275, screenH * 0.3529) then playSoundFrontEnd ( 44 ) removeEventHandler("onClientRender", root, DxIdentidade) Identidade = false AbrirPainelS() end end end end addEventHandler ("onClientClick", root, ClicarIdentidade ) function ClicarNosBotoes (_,state) if Painel == true then if state == "down" then if isCursorOnElement (screenW * 0.3624, screenH * 0.3516, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VIdentidade", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) FecharPainelS() addEventHandler("onClientRender", root, DxIdentidade) Identidade = true showCursor(true) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.3958, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VCNH", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.4414, screenW * 0.1603, screenH * 0.0391) then playSoundFrontEnd ( 44 ) FecharPainelS() addEventHandler("onClientRender", root, darmulta) VMultar = true showCursor(true) guiSetVisible ( MotivoMulta, true ) guiSetVisible ( ValorMulta, true ) guiSetText(MotivoMulta, "") guiSetText(ValorMulta,"") elseif isCursorOnElement(screenW * 0.3624, screenH * 0.4870, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VAlgemar", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.5313, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VRevistar", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.5768, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VDrogas", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.6224, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VArmas", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.6693, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VPrender", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) end end end end addEventHandler ("onClientClick", root, ClicarNosBotoes ) function isCursorOnElement( x,y,w,h ) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end Codigo Server Side (Inteiro e com a alteração) Spoiler -- LG7 Scripter - Não remova os créditos por favor! -- Acesse meu canal e tenha mais conteúdos como esse: -- https://www.youtube.com/c/LG7MTA -- Tenha um(a) bom(a) Dia/Tarde/Noite function AbrirPainel(source,cmd,pname) local accName = getAccountName ( getPlayerAccount ( source ) ) local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policial" ) ) then cliente = getPlayerFromPartialName(pname) or getPlayerFromID(pname) if isElement(cliente) then if dist <= 7 then local PegarId = getPlayerFromID(cliente) local PegarNick = getPlayerName(cliente) local PegarNome = getElementData(cliente, "AirNew_RG_NomeCompleto") or "N/A" local PegarSobrenome = getElementData(cliente, "AirNew_RG_Sobrenome") or "N/A" local Idade = getElementData(cliente, "AirNew_RG_Idade") or "N/A" local Peso = getElementData(cliente, "Peso") or "70Kg" local Altura = getElementData(cliente, "Altura") or "1,70m" local Sexo = getElementData(cliente, "Sexo") or "Masculino" local Porte = getElementData(cliente, "AirNewSCR_Porte_de_Armas") or "Não possui" local Wanted = getPlayerWantedLevel(cliente) local Dinheiro = getPlayerMoney(cliente) local Level = getElementData(cliente, "Level") or "0" local ID = getElementData(cliente, "ID") or "N/A" local DinheiroSujo =getElementData(cliente, "moneysujo") or "0" VCNH(cliente) --/> Adicionado. setElementData(source, "Suspeito:ID", PegarId) setElementData(source, "Suspeito:Nick", PegarNick) setElementData(source, "Suspeito:AirNew_RG_NomeCompleto",PegarNome) setElementData(source, "Suspeito:AirNew_RG_Sobrenome",PegarSobrenome) setElementData(source, "Suspeito:AirNew_RG_Idade",Idade) setElementData(source, "Suspeito:Peso",Peso) setElementData(source, "Suspeito:Altura",Altura) setElementData(source, "Suspeito:Sexo",Sexo) setElementData(source, "Suspeito:AirNewSCR_Porte_de_Armas",Porte) setElementData(source, "Suspeito:Wanted",Wanted) setElementData(source, "Suspeito:Dinheiro",Dinheiro) setElementData(source, "Suspeito:Level",Level) setElementData(source, "Suspeito:ID",ID) setElementData(source, "Suspeito:moneysujo", DinheiroSujo) setElementData(source, "L:IDRevistado", PegarId) triggerClientEvent(source, "L:Iniciou_Comando", source) else outputChatBox("#0064c8» #ffffffEsse jogador está muito longe.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffEsse jogador não existe ou está offiline.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffVocê não tem permissão para esse comando.",source,255,255,255,true) end end addCommandHandler("v",AbrirPainel) function VCNH( cliente ) if getElementData(cliente, "DNL:TestePratico", true ) then return end if getElementData(cliente, "DNL:Categoria(A)", true) then local moto = "Moto" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(A)", false) then local moto = "Moto Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) end --else CNH = " false" then --local CNHN = ("Não Possui") --outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..CNHN, source, 255,255,255,true) end addEvent ( "L:VCNH", true) addEventHandler ( "L:VCNH", root, VCNH ) function VMultar() local Valor = getElementData(source,"L:ValorMulta") or 0 local Motivo = getElementData(source, "L:MotivoMulta") or "erro" outputChatBox("#0064c8»#ffffff Você multou o jogador #0064c8"..getPlayerName(cliente).."#ffffff por #0064c8$"..Valor.."#ffffff pelo motivo #0064c8".. Motivo, source, 255,255,255,true) outputChatBox("#0064c8»#ffffff O Polícial #0064c8"..getPlayerName(source).."#ffffff te multou por #0064c8$"..Valor.."#ffffff pelo motivo #0064c8"..Motivo, cliente, 255,255,255,true) takePlayerMoney(cliente,Valor) end addEvent ( "L:MultouJogador", true) addEventHandler ( "L:MultouJogador", root, VMultar ) algemar = false function VAlgemar2() local algemado = getElementData(cliente,"algemado") or false if algemado == false then setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) -- Animação de algemar setElementFrozen( cliente, true ) -- Freezar jogador setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) toggleControl(cliente, "fire", false) -- retirar função de atirar setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) setElementData(cliente,"algemado",true) else setPedAnimation( cliente) -- Animação de algemar setElementFrozen( cliente, false ) -- Freezar jogador toggleControl(cliente, "fire", true) -- retirar função de atirar setElementData(cliente,"algemado",false) end end addEvent ( "L:VAlgemar", true) addEventHandler ( "L:VAlgemar", root, VAlgemar2 ) function VRevistar() local Drogas = getElementData(cliente, "L:Maconhas") or 0 outputChatBox ( "#0064c8» #ffffffDrogas do jogador:#0064c8 "..Drogas, source, 255, 255, 255, true ) outputChatBox ( "#0064c8» #ffffffArmas do jogador:", source, 255, 255, 255, true ) for slot = 0, 12 do local Armas = getPedWeapon ( cliente, slot ) local Municao = getPedTotalAmmo ( cliente, slot ) if Armas > 0 then if Municao > 0 then weapon_nome = getWeaponNameFromID ( Armas ) outputChatBox ( "#0064c8» #ffffff"..weapon_nome.." #0064c8- #ffffff"..Municao.." Bala(s)!", source, 255, 255, 255, true ) end end end end addEvent ( "L:VRevistar", true) addEventHandler ( "L:VRevistar", root, VRevistar ) function VDrogas() local Drogas = getElementData(cliente, "L:Maconhas") or 0 if Drogas > 0 then outputChatBox ( "#0064c8» #ffffffVocê prendeu #0064c8"..Drogas.."#ffffff do suspeito.", source, 255, 255, 255, true ) setElementData(cliente,"L:Maconhas",0) outputChatBox("Você abriu Drogas", source, 255,255,255) else outputChatBox ( "#0064c8» #ffffffEsse jogador não possui drogas.", source, 255, 255, 255, true ) end end addEvent ( "L:VDrogas", true) addEventHandler ( "L:VDrogas", root, VDrogas ) function VArmas() takeAllWeapons (cliente) outputChatBox ( "#0064c8» #ffffffVocê prendeu todas as armas do suspeito.", source, 255, 255, 255, true ) end addEvent ( "L:VArmas", true) addEventHandler ( "L:VArmas", root, VArmas ) ultimovei = false function verificarV(thePlayer) theVehicle = getPedOccupiedVehicle ( thePlayer ) local id = getElementModel ( theVehicle ) if id == 596 or id == 490 then ultimovei = true else ultimovei = false end end addEventHandler("onVehicleEnter",root,verificarV) function VPrender() local Preso = getElementData(cliente, "IndoPreso") or false if ultimovei == true then if Preso == false then attachElements (cliente,theVehicle, 0, -1.7, 0.7 ) setPedAnimation( cliente, "CRACK", "crckidle3", -1, true, false, false, false) -- Animação de algemar setElementData(cliente, "IndoPreso",true) else detachElements(cliente,theVehicle,0,2,0) setPedAnimation(cliente) setElementData(cliente,"IndoPreso",false) end else outputChatBox("#0064c8» #ffffffSeu ultimo veículo tem que ser um carro da polícia.",source,255,255,255,true) end end addEvent ( "L:VPrender", true) addEventHandler ( "L:VPrender", root, VPrender ) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function getPlayerFromID ( id ) for k, player in ipairs ( getElementsByType ( "player" ) ) do local p_id = getElementData ( player, "ID" ) if ( p_id == tonumber(id) ) then player_n = getPlayerName ( player ) return player, player_n end end end Link to comment
Angelo Pereira Posted February 21, 2020 Share Posted February 21, 2020 Eu expliquei de formas, um faça um check diretamente no comando, ou utilizando o trigger (você fez os dois, e não adicionou o que eu falei, enfim)... Sabemos que é da net, da pra identifica só pela bagunça, mas, não quer dizer que não pode ajeitar-lo. Teste isso : -- LG7 Scripter - Não remova os créditos por favor! -- Acesse meu canal e tenha mais conteúdos como esse: -- https://www.youtube.com/c/LG7MTA -- Tenha um(a) bom(a) Dia/Tarde/Noite local screenW, screenH = guiGetScreenSize() local resW, resH = 1366, 768 local x, y = (screenW/resW), (screenH/resH) Painel = false Identidade = false function DxRevistar() local IdRevistado = getElementData(localPlayer, "Suspeito:Nick") or "N/A" dxDrawLine((screenW * 0.3602) - 1, (screenH * 0.3008) - 1, (screenW * 0.3602) - 1, screenH * 0.7292, tocolor(0, 100, 200, 255), 1, false) dxDrawLine(screenW * 0.5256, (screenH * 0.3008) - 1, (screenW * 0.3602) - 1, (screenH * 0.3008) - 1, tocolor(0, 100, 200, 255), 1, false) dxDrawLine((screenW * 0.3602) - 1, screenH * 0.7292, screenW * 0.5256, screenH * 0.7292, tocolor(0, 100, 200, 255), 1, false) dxDrawLine(screenW * 0.5256, screenH * 0.7292, screenW * 0.5256, (screenH * 0.3008) - 1, tocolor(0, 100, 200, 255), 1, false) dxDrawRectangle(screenW * 0.3602, screenH * 0.3008, screenW * 0.1654, screenH * 0.4284, tocolor(47, 47, 47, 255), false) dxDrawText("Nome: #0064c8"..IdRevistado, screenW * 0.3624, screenH * 0.3086, screenW * 0.5227, screenH * 0.3385, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "center", false, false, false, true, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.3516, screenW * 0.1603, screenH * 0.0391, Cor1, false) dxDrawText("Identidade", screenW * 0.4056, screenH * 0.3516, screenW * 0.4802, screenH * 0.3906, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.3958, screenW * 0.1603, screenH * 0.0391, Cor2, false) dxDrawText("Checar CNH", screenW * 0.4056, screenH * 0.3958, screenW * 0.4802, screenH * 0.4349, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.4414, screenW * 0.1603, screenH * 0.0391, Cor3, false) dxDrawText("Multar", screenW * 0.4056, screenH * 0.4414, screenW * 0.4802, screenH * 0.4805, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.4870, screenW * 0.1603, screenH * 0.0391, Cor4, false) dxDrawText("Algemar", screenW * 0.4056, screenH * 0.4870, screenW * 0.4802, screenH * 0.5260, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.5313, screenW * 0.1603, screenH * 0.0391, Cor5, false) dxDrawText("Revistar", screenW * 0.4056, screenH * 0.5313, screenW * 0.4802, screenH * 0.5703, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.5768, screenW * 0.1603, screenH * 0.0391, Cor6, false) dxDrawText("Apreender drogas", screenW * 0.4056, screenH * 0.5768, screenW * 0.4802, screenH * 0.6159, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.6224, screenW * 0.1603, screenH * 0.0391, Cor7, false) dxDrawText("Apreender armas", screenW * 0.4056, screenH * 0.6224, screenW * 0.4802, screenH * 0.6615, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.3624, screenH * 0.6693, screenW * 0.1603, screenH * 0.0391, Cor8, false) dxDrawText("Prender", screenW * 0.4056, screenH * 0.6693, screenW * 0.4802, screenH * 0.7083, tocolor(255, 255, 255, 255), 1.10, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.5183, screenH * 0.3516, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.3958, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.4414, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.4870, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.5313, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.5768, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.6224, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) dxDrawRectangle(screenW * 0.5183, screenH * 0.6693, screenW * 0.0044, screenH * 0.0391, tocolor(0, 100, 200, 255), false) Cor1 = tocolor(30, 30, 30, 255) Cor2 = tocolor(30, 30, 30, 255) Cor3 = tocolor(30, 30, 30, 255) Cor4 = tocolor(30, 30, 30, 255) Cor5 = tocolor(30, 30, 30, 255) Cor6 = tocolor(30, 30, 30, 255) Cor7 = tocolor(30, 30, 30, 255) Cor8 = tocolor(30, 30, 30, 255) if isCursorOnElement(screenW * 0.3624, screenH * 0.3516, screenW * 0.1603, screenH * 0.0391) then Cor1 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.3958, screenW * 0.1603, screenH * 0.0391) then Cor2 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.4414, screenW * 0.1603, screenH * 0.0391) then Cor3 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.4870, screenW * 0.1603, screenH * 0.0391) then Cor4 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.5313, screenW * 0.1603, screenH * 0.0391) then Cor5 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.5768, screenW * 0.1603, screenH * 0.0391) then Cor6 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.6224, screenW * 0.1603, screenH * 0.0391) then Cor7 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.3624, screenH * 0.6693, screenW * 0.1603, screenH * 0.0391) then Cor8 = tocolor(0, 100, 200, 255) end end function AbrirPainel() if Identidade == false then if VMultar == false then if (Painel) then removeEventHandler("onClientRender",root,DxRevistar) Painel = false showCursor(false) else addEventHandler("onClientRender",root,DxRevistar) Painel = true showCursor(true) end end end end addEvent ( "L:Iniciou_Comando", true) addEventHandler ( "L:Iniciou_Comando", root, AbrirPainel ) VMultar = false function DxIdentidade() local Nick =getElementData(localPlayer, "Suspeito:Nick" ) or "N/A" local Nome =getElementData(localPlayer, "Suspeito:AirNew_RG_NomeCompleto")or "N/A" local Sobrenome =getElementData(localPlayer, "Suspeito:AirNew_RG_Sobrenome")or "N/A" local Idade =getElementData(localPlayer, "Suspeito:AirNew_RG_Idade")or "N/A" local Peso =getElementData(localPlayer, "Suspeito:Peso")or "80 Kg" local Altura =getElementData(localPlayer, "Suspeito:Altura")or "1,72m" local Sexo =getElementData(localPlayer, "Suspeito:Sexo")or "Masculino" local Porte =getElementData(localPlayer, "Suspeito:AirNewSCR_Porte_de_Armas")or "Não possui" local Wanted = getElementData(localPlayer, "Suspeito:Wanted")or "N/A" local Dinheiro =getElementData(localPlayer, "Suspeito:Dinheiro")or "N/A" local Level =getElementData(localPlayer, "Suspeito:Level")or "N/A" local ID = getElementData(localPlayer, "ID") or "N/A" local DinheiroSujo =getElementData(localPlayer, "Suspeito:moneysujo") or "0" dxDrawRectangle(screenW * 0.4114, screenH * 0.3216, screenW * 0.2584, screenH * 0.3099, tocolor(47, 47, 47, 255), false) dxDrawText("<", screenW * 0.4114, screenH * 0.3242, screenW * 0.4275, screenH * 0.3529, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Nome:", screenW * 0.4290, screenH * 0.3659, screenW * 0.4810, screenH * 0.3815, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Idade:", screenW * 0.4290, screenH * 0.3945, screenW * 0.4810, screenH * 0.4102, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Peso:", screenW * 0.4290, screenH * 0.4232, screenW * 0.4810, screenH * 0.4388, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Altura:", screenW * 0.4290, screenH * 0.4518, screenW * 0.4810, screenH * 0.4674, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Sexo:", screenW * 0.4290, screenH * 0.4805, screenW * 0.4810, screenH * 0.4961, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("ID: ", screenW * 0.4290, screenH * 0.5091, screenW * 0.4810, screenH * 0.5247, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Level:", screenW * 0.4290, screenH * 0.5378, screenW * 0.4810, screenH * 0.5534, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Porte de Armas:", screenW * 0.4290, screenH * 0.5664, screenW * 0.4810, screenH * 0.5820, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, true, false, false) dxDrawText("Nível de procurado:", screenW * 0.4290, screenH * 0.5951, screenW * 0.4810, screenH * 0.6107, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, true, false, false) dxDrawText("Dinheiro Limpo:", screenW * 0.5198, screenH * 0.3945, screenW * 0.5717, screenH * 0.4102, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Dinheiro Sujo:", screenW * 0.5198, screenH * 0.4258, screenW * 0.5717, screenH * 0.4414, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Nome.." "..Sobrenome, screenW * 0.4634, screenH * 0.3659, screenW * 0.6603, screenH * 0.3815, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Idade, screenW * 0.4605, screenH * 0.3945, screenW * 0.5124, screenH * 0.4102, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Peso, screenW * 0.4605, screenH * 0.4232, screenW * 0.5124, screenH * 0.4388, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Altura, screenW * 0.4634, screenH * 0.4518, screenW * 0.5124, screenH * 0.4674, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Sexo, screenW * 0.4597, screenH * 0.4805, screenW * 0.5124, screenH * 0.4961, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(ID, screenW * 0.4451, screenH * 0.5091, screenW * 0.4978, screenH * 0.5247, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Level, screenW * 0.4627, screenH * 0.5378, screenW * 0.5154, screenH * 0.5534, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Porte, screenW * 0.5081, screenH * 0.5664, screenW * 0.5608, screenH * 0.5820, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText(Wanted, screenW * 0.5227, screenH * 0.5951, screenW * 0.5754, screenH * 0.6107, tocolor(0, 100, 200, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("R$ "..Dinheiro, screenW * 0.5966, screenH * 0.3945, screenW * 0.6493, screenH * 0.4102, tocolor(97, 255, 101, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("R$ "..DinheiroSujo, screenW * 0.5893, screenH * 0.4258, screenW * 0.6420, screenH * 0.4414, tocolor(255, 79, 79, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawText("Identidade", screenW * 0.4693, screenH * 0.3281, screenW * 0.6237, screenH * 0.3529, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end MotivoMulta = guiCreateEdit(x*595, y*302, x*178, y*23, "", false) guiSetAlpha ( MotivoMulta, 0.85 ) guiEditSetMaxLength ( MotivoMulta, 100) guiSetVisible ( MotivoMulta, false ) ValorMulta = guiCreateEdit(x*596, y*330, x*178, y*23, "", false) guiSetAlpha ( ValorMulta, 0.85 ) guiEditSetMaxLength ( ValorMulta, 100) guiSetVisible ( ValorMulta, false ) local bmotivo = guiCreateButton(screenW * 0.4107, screenH * 0.4805, screenW * 0.1413, screenH * 0.0299,"",false) guiSetAlpha(bmotivo,0) local bfechar = guiCreateButton(screenW * 0.4107, screenH * 0.5130, screenW * 0.1413, screenH * 0.0299,"",false) guiSetAlpha(bfechar,0) addEventHandler("onClientGUIClick",bmotivo, function () if VMultar == true then local motivo = guiGetText(MotivoMulta) local valor = guiGetText(ValorMulta) setElementData(localPlayer,"L:MotivoMulta",motivo) setElementData(localPlayer,"L:ValorMulta",valor) triggerServerEvent("L:MultouJogador",localPlayer) end end) addEventHandler("onClientGUIClick",bfechar, function () if VMultar == true then removeEventHandler("onClientRender", root, darmulta) VMultar = false showCursor(false) guiSetVisible ( MotivoMulta, false ) guiSetVisible ( ValorMulta, false ) AbrirPainelS() end end) local screenW, screenH = guiGetScreenSize() function darmulta() dxDrawRectangle(screenW * 0.3895, screenH * 0.3620, screenW * 0.1867, screenH * 0.2031, tocolor(27, 27, 27, 255), false) dxDrawText("MULTAR", screenW * 0.3902, screenH * 0.3633, screenW * 0.5761, screenH * 0.3828, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("MOTIVO:", screenW * 0.3895, screenH * 0.3958, screenW * 0.4363, screenH * 0.4232, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("VALOR:", screenW * 0.3895, screenH * 0.4297, screenW * 0.4363, screenH * 0.4570, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.4107, screenH * 0.4805, screenW * 0.1413, screenH * 0.0299, mul1, false) dxDrawText("MULTAR", screenW * 0.4107, screenH * 0.4805, screenW * 0.5520, screenH * 0.5104, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(screenW * 0.4107, screenH * 0.5130, screenW * 0.1413, screenH * 0.0299, mul2, false) dxDrawText("VOLTAR", screenW * 0.4107, screenH * 0.5130, screenW * 0.5520, screenH * 0.5430, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) mul1 =tocolor(0, 0, 1, 255) mul2 = tocolor(0, 0, 1, 255) if isCursorOnElement(screenW * 0.4107, screenH * 0.4805, screenW * 0.1413, screenH * 0.0299) then mul1 = tocolor(0, 100, 200, 255) end if isCursorOnElement(screenW * 0.4107, screenH * 0.5130, screenW * 0.1413, screenH * 0.0299) then mul2 = tocolor(0, 100, 200, 255) end end function FecharPainelS() removeEventHandler("onClientRender",root,DxRevistar) Painel = false showCursor(false) end function AbrirPainelS() addEventHandler("onClientRender",root,DxRevistar) Painel = true showCursor(true) end function ClicarIdentidade (_,state) if Identidade == true then if state == "down" then if isCursorOnElement (screenW * 0.4114, screenH * 0.3242, screenW * 0.4275, screenH * 0.3529) then playSoundFrontEnd ( 44 ) removeEventHandler("onClientRender", root, DxIdentidade) Identidade = false AbrirPainelS() end end end end addEventHandler ("onClientClick", root, ClicarIdentidade ) function ClicarNosBotoes (_,state) if Painel == true then if state == "down" then if isCursorOnElement (screenW * 0.3624, screenH * 0.3516, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VIdentidade", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) FecharPainelS() addEventHandler("onClientRender", root, DxIdentidade) Identidade = true showCursor(true) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.3958, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VCNH", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.4414, screenW * 0.1603, screenH * 0.0391) then playSoundFrontEnd ( 44 ) FecharPainelS() addEventHandler("onClientRender", root, darmulta) VMultar = true showCursor(true) guiSetVisible ( MotivoMulta, true ) guiSetVisible ( ValorMulta, true ) guiSetText(MotivoMulta, "") guiSetText(ValorMulta,"") elseif isCursorOnElement(screenW * 0.3624, screenH * 0.4870, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VAlgemar", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.5313, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VRevistar", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.5768, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VDrogas", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.6224, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VArmas", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) elseif isCursorOnElement(screenW * 0.3624, screenH * 0.6693, screenW * 0.1603, screenH * 0.0391) then triggerServerEvent ("L:VPrender", getLocalPlayer(), localPlayer) playSoundFrontEnd ( 44 ) end end end end addEventHandler ("onClientClick", root, ClicarNosBotoes ) function isCursorOnElement( x,y,w,h ) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end Server-side -- LG7 Scripter - Não remova os créditos por favor! -- Acesse meu canal e tenha mais conteúdos como esse: -- https://www.youtube.com/c/LG7MTA -- Tenha um(a) bom(a) Dia/Tarde/Noite function AbrirPainel(source,cmd,pname) local accName = getAccountName ( getPlayerAccount ( source ) ) local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policial" ) ) then cliente = getPlayerFromPartialName(pname) or getPlayerFromID(pname) if isElement(cliente) then if dist <= 7 then local PegarId = getPlayerFromID(cliente) local PegarNick = getPlayerName(cliente) local PegarNome = getElementData(cliente, "AirNew_RG_NomeCompleto") or "N/A" local PegarSobrenome = getElementData(cliente, "AirNew_RG_Sobrenome") or "N/A" local Idade = getElementData(cliente, "AirNew_RG_Idade") or "N/A" local Peso = getElementData(cliente, "Peso") or "70Kg" local Altura = getElementData(cliente, "Altura") or "1,70m" local Sexo = getElementData(cliente, "Sexo") or "Masculino" local Porte = getElementData(cliente, "AirNewSCR_Porte_de_Armas") or "Não possui" local Wanted = getPlayerWantedLevel(cliente) local Dinheiro = getPlayerMoney(cliente) local Level = getElementData(cliente, "Level") or "0" local ID = getElementData(cliente, "ID") or "N/A" local DinheiroSujo =getElementData(cliente, "moneysujo") or "0" setElementData(source, "Suspeito:ID", PegarId) setElementData(source, "Suspeito:Nick", PegarNick) setElementData(source, "Suspeito:AirNew_RG_NomeCompleto",PegarNome) setElementData(source, "Suspeito:AirNew_RG_Sobrenome",PegarSobrenome) setElementData(source, "Suspeito:AirNew_RG_Idade",Idade) setElementData(source, "Suspeito:Peso",Peso) setElementData(source, "Suspeito:Altura",Altura) setElementData(source, "Suspeito:Sexo",Sexo) setElementData(source, "Suspeito:AirNewSCR_Porte_de_Armas",Porte) setElementData(source, "Suspeito:Wanted",Wanted) setElementData(source, "Suspeito:Dinheiro",Dinheiro) setElementData(source, "Suspeito:Level",Level) setElementData(source, "Suspeito:ID",ID) setElementData(source, "Suspeito:moneysujo", DinheiroSujo) setElementData(source, "L:IDRevistado", PegarId) triggerClientEvent(source, "L:Iniciou_Comando", source) else outputChatBox("#0064c8» #ffffffEsse jogador está muito longe.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffEsse jogador não existe ou está offiline.",source,255,255,255,true) end else outputChatBox("#0064c8» #ffffffVocê não tem permissão para esse comando.",source,255,255,255,true) end end addCommandHandler("v",AbrirPainel) function VCNH () if getElementData(cliente, "DNL:TestePratico", true ) then return end if getElementData(cliente, "DNL:Categoria(A)", true) then local moto = "Moto" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(A)", false) then local moto = "Moto Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..moto, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carros, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..caminhao, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..carreta, source, 255,255,255,true) end if getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) elseif getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero Não Possui" outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..helicoptero, source, 255,255,255,true) end --else CNH = " false" then --local CNHN = ("Não Possui") --outputChatBox("#0064c8»#ffffff Possui habilitação: #0064c8"..CNHN, source, 255,255,255,true) end addEvent ( "L:VCNH", true) addEventHandler ( "L:VCNH", root, VCNH ) function VMultar() local Valor = getElementData(source,"L:ValorMulta") or 0 local Motivo = getElementData(source, "L:MotivoMulta") or "erro" outputChatBox("#0064c8»#ffffff Você multou o jogador #0064c8"..getPlayerName(cliente).."#ffffff por #0064c8$"..Valor.."#ffffff pelo motivo #0064c8".. Motivo, source, 255,255,255,true) outputChatBox("#0064c8»#ffffff O Polícial #0064c8"..getPlayerName(source).."#ffffff te multou por #0064c8$"..Valor.."#ffffff pelo motivo #0064c8"..Motivo, cliente, 255,255,255,true) takePlayerMoney(cliente,Valor) end addEvent ( "L:MultouJogador", true) addEventHandler ( "L:MultouJogador", root, VMultar ) algemar = false function VAlgemar2() local algemado = getElementData(cliente,"algemado") or false if algemado == false then setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) -- Animação de algemar setElementFrozen( cliente, true ) -- Freezar jogador setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) toggleControl(cliente, "fire", false) -- retirar função de atirar setPedAnimation( cliente, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) setElementData(cliente,"algemado",true) else setPedAnimation( cliente) -- Animação de algemar setElementFrozen( cliente, false ) -- Freezar jogador toggleControl(cliente, "fire", true) -- retirar função de atirar setElementData(cliente,"algemado",false) end end addEvent ( "L:VAlgemar", true) addEventHandler ( "L:VAlgemar", root, VAlgemar2 ) function VRevistar() local Drogas = getElementData(cliente, "L:Maconhas") or 0 outputChatBox ( "#0064c8» #ffffffDrogas do jogador:#0064c8 "..Drogas, source, 255, 255, 255, true ) outputChatBox ( "#0064c8» #ffffffArmas do jogador:", source, 255, 255, 255, true ) for slot = 0, 12 do local Armas = getPedWeapon ( cliente, slot ) local Municao = getPedTotalAmmo ( cliente, slot ) if Armas > 0 then if Municao > 0 then weapon_nome = getWeaponNameFromID ( Armas ) outputChatBox ( "#0064c8» #ffffff"..weapon_nome.." #0064c8- #ffffff"..Municao.." Bala(s)!", source, 255, 255, 255, true ) end end end end addEvent ( "L:VRevistar", true) addEventHandler ( "L:VRevistar", root, VRevistar ) function VDrogas() local Drogas = getElementData(cliente, "L:Maconhas") or 0 if Drogas > 0 then outputChatBox ( "#0064c8» #ffffffVocê prendeu #0064c8"..Drogas.."#ffffff do suspeito.", source, 255, 255, 255, true ) setElementData(cliente,"L:Maconhas",0) outputChatBox("Você abriu Drogas", source, 255,255,255) else outputChatBox ( "#0064c8» #ffffffEsse jogador não possui drogas.", source, 255, 255, 255, true ) end end addEvent ( "L:VDrogas", true) addEventHandler ( "L:VDrogas", root, VDrogas ) function VArmas() takeAllWeapons (cliente) outputChatBox ( "#0064c8» #ffffffVocê prendeu todas as armas do suspeito.", source, 255, 255, 255, true ) end addEvent ( "L:VArmas", true) addEventHandler ( "L:VArmas", root, VArmas ) ultimovei = false function verificarV(thePlayer) theVehicle = getPedOccupiedVehicle ( thePlayer ) local id = getElementModel ( theVehicle ) if id == 596 or id == 490 then ultimovei = true else ultimovei = false end end addEventHandler("onVehicleEnter",root,verificarV) function VPrender() local Preso = getElementData(cliente, "IndoPreso") or false if ultimovei == true then if Preso == false then attachElements (cliente,theVehicle, 0, -1.7, 0.7 ) setPedAnimation( cliente, "CRACK", "crckidle3", -1, true, false, false, false) -- Animação de algemar setElementData(cliente, "IndoPreso",true) else detachElements(cliente,theVehicle,0,2,0) setPedAnimation(cliente) setElementData(cliente,"IndoPreso",false) end else outputChatBox("#0064c8» #ffffffSeu ultimo veículo tem que ser um carro da polícia.",source,255,255,255,true) end end addEvent ( "L:VPrender", true) addEventHandler ( "L:VPrender", root, VPrender ) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function getPlayerFromID ( id ) for k, player in ipairs ( getElementsByType ( "player" ) ) do local p_id = getElementData ( player, "ID" ) if ( p_id == tonumber(id) ) then player_n = getPlayerName ( player ) return player, player_n end end end 1 Link to comment
virgingod Posted February 21, 2020 Author Share Posted February 21, 2020 (edited) 4 minutes ago, Angelo Pereira said: Sabemos que é da net, da pra identificar só pela bagunça, mas, não quer dizer que não pode ajeitar-lo. Vou me atentar a organizar melhor o scripts, obrigado, funcionou perfeitamente, Thanks man Edited February 21, 2020 by Breevz Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now