Jump to content

Crazy

Members
  • Posts

    13
  • Joined

  • Last visited

Crazy's Achievements

Square

Square (6/54)

0

Reputation

  1. Bom tentei criar um Script onde ele bloquearia o a viatura para outros players porem nao funcionou nao exatamente Bom ele impede q o player entre no carro mas caso o jogador saia e deixe a porta aberta jogadores que nao pertença a acl conseguem entrar e dirigir eu queria q de alguma maneira eles entrassem e fossem ejetados do carro function enterVehicle(player, seat, jacked) local account = getPlayerAccount(player) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if (getElementModel(source) == 580) and (not isObjectInACLGroup("user.".. accountName,aclGetGroup("Teste"))) then setVehicleLocked(source, true) outputChatBox("Teste Teste Teste Teste.", player) else setVehicleLocked(source, false) end end addEventHandler("onVehicleStartEnter",root,enterVehicle)
  2. Tentei mas como o script não é meu não consegui fazer muito
  3. Então ja tentei entrar em contato varias vezes des do dia do pedido de ajuda porem nao conseguir resposta alguma tentei alterar outra coisa do scrip mas novamente sem sucesso --[[ =========================================================== # Minha página: https://www.facebook.com/TioSteinScripter/# # ╔════╗╔══╗╔═══╗ ╔═══╗╔════╗╔═══╗╔══╗╔═╗─╔╗ # # ║╔╗╔╗║╚╣─╝║╔═╗║ ║╔═╗║║╔╗╔╗║║╔══╝╚╣─╝║║╚╗║║ # # ╚╝║║╚╝─║║─║║─║║ ║╚══╗╚╝║║╚╝║╚══╗─║║─║╔╗╚╝║ # # ──║║───║║─║║─║║ ╚══╗║──║║──║╔══╝─║║─║║╚╗║║ # # ──║║──╔╣─╗║╚═╝║ ║╚═╝║──║║──║╚══╗╔╣─╗║║─║║║ # # ──╚╝──╚══╝╚═══╝ ╚═══╝──╚╝──╚═══╝╚══╝╚╝─╚═╝ # =========================================================== --]] Comando = "policial" ACL = "Staff" CorPainel = tocolor(225, 0, 0, 252) NomeDoServidor = "BRASIL NA VIBE RP" ------------- Nome que você quer que apareça no painel ElementDataBanco = "TS:Banco" -------------- Element Data Do Banco, o mesmo da HUD ElementDataPorteDeArmas = "TS:PorteDeArmas" -------------- Element Data Do Porte de armas if getElementData(cliente, "DNL:TestePratico", true ) then return end if getElementData(cliente, "DNL:Categoria(A)", true) then local moto = "Moto" elseif getElementData(cliente, "DNL:Categoria(A)", false) then local moto = "Moto Não Possui" end if getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro" elseif getElementData(cliente, "DNL:Categoria(B)", true) then local carros = "Carro Não Possui" end if getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão" elseif getElementData(cliente, "DNL:Categoria(C)", true) then local caminhao = "Caminhão Não Possui" end if getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta" elseif getElementData(cliente, "DNL:Categoria(D)", true) then local carreta = "Carreta Não Possui" end if getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero" elseif getElementData(cliente, "DNL:Categoria(E)", true) then local helicoptero = "Helicoptero Não Possui" end ElementRG = "ID" ------------------- Element Data RG ElementDataNascimento = "TS:DataDeNascimento" ------------------- Element Data de nascimento TiposDeMulta = { {"Infração Gravíssima", 5000}, ------------- Motivo da multa, Valor da multa {"Infração Grave", 4000}, ------------- Motivo da multa, Valor da multa {"Infração Média", 3000}, ------------- Motivo da multa, Valor da multa {"Infração Leve", 2000}, ------------- Motivo da multa, Valor da multa }
  4. Gostaria que minha lojinha adiciona-se 1 estrela a mais para a pessoa que efetua-se o assalto tentei de varias maneiras mas nao achei onde encaixa o commando SetPlayerWanted Script da lojinha abaixo --------- Variaveis local PedLoja03 = createPed(155, 2745.432, -2077.514, 13.554, 0) setElementFrozen(PedLoja03, true) setElementData(PedLoja03, "TS:Blindado", true) local BlipLoja = createBlipAttachedTo(PedLoja03, 17) setBlipVisibleDistance(BlipLoja , 150) local BlipLojaAssalta = createBlipAttachedTo(PedLoja03, 20) setElementVisibleTo(BlipLojaAssalta, root, false) ---- Sistema function IniciarAssalto03 (Ped) if Ped == PedLoja03 then local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 28 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end if getElementData(source, "TS:Assaltando03") then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Policial")) then return end if getElementData(Ped, "TS:Assaltando03") then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffEssa loja foi assaltada recentemente!", "info") return end local x, y, z = getElementPosition( source ) local x1, y1, z1 = getElementPosition( Ped ) local distance = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ) if distance >= 3 then return end triggerClientEvent(source, "TS:PainelAssalto03", source) end end addEventHandler ("onPlayerTarget", root, IniciarAssalto03) function ComecarAAssaltar (source) if getElementData(source, "TS:Assaltando03") then return end local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 28 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end local Valor = math.random(460, 2000) setElementData(source, "TS:Assaltando03", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(PedLoja03, "SHOP", "SHP_Rob_GiveCash", -1, false) setElementFrozen(source, true) toggleAllControls(source, false) setElementPosition(source, 2745.397, -2075.392, 13.554) setElementRotation(source, -0, 0, 182.41223144531) setElementData(PedLoja03, "TS:Assaltando03", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) LojaAssaltada(source) triggerClientEvent(source, "TS:BarraDeProgresso03", source) setTimer(function() setPedAnimation(source, nil) setPedAnimation(PedLoja03, nil) setElementFrozen(source, false) toggleAllControls(source, true) givePlayerMoney(source, Valor) triggerClientEvent(source, "TS:BarraDeProgresso032", source) setElementData(source, "TS:Assaltando03", false) end, 2*10000, 1) end addEvent("TS:IniciarAssalto03", true) addEventHandler("TS:IniciarAssalto03", root, ComecarAAssaltar) function LojaAssaltada(source) setElementVisibleTo(BlipLoja, root, false) setElementVisibleTo(BlipLojaAssalta, root, true) outputChatBox("#FF0000BMA_Nᴇᴡs➢ #FFFFFFO jogador "..getPlayerName(source).." #FFFFFFestá assaltando a lojinha 03",root,255,0,0,true) setTimer(function() setElementVisibleTo(BlipLoja, root, true) setElementVisibleTo(BlipLojaAssalta, root, false) setElementData(PedLoja03, "TS:Assaltando03", false) end, 7*200000, 1 ) end
  5. Gente esqueci de avisar mas funcionou caso o seu seja uma versao diferente so alterar os numeros Mt OBRIGADO
  6. descrevendo o problema de outra forma a lista de CNH q o player possui nao aparece no painel Policial mesmo a resource estando na acl admin mesmo eu editando o GetElementData ou ate msm o SetElementData nao importa no funciona queria que voces me mostrace como resolver isso n sou bom com linguagem lua pois sou novo nisso mas tudo q apredi eu modifiquei mas n obtive sucesso
  7. Recentemente abaixei um mod da internet cujo a funçao dele e interação policial na hora de algemar prender esses trem porem nao e possivel ver a CNH pelo painel ja mudei o SetElementData O GetElementData Modifiquei acl coloquei na acl adm mas sem sucesso ja tentei contatar o dono do mod peço facebook porem sem exito --[[ =========================================================== # Minha página: https://www.facebook.com/TioSteinScripter/# # ╔════╗╔══╗╔═══╗ ╔═══╗╔════╗╔═══╗╔══╗╔═╗─╔╗ # # ║╔╗╔╗║╚╣─╝║╔═╗║ ║╔═╗║║╔╗╔╗║║╔══╝╚╣─╝║║╚╗║║ # # ╚╝║║╚╝─║║─║║─║║ ║╚══╗╚╝║║╚╝║╚══╗─║║─║╔╗╚╝║ # # ──║║───║║─║║─║║ ╚══╗║──║║──║╔══╝─║║─║║╚╗║║ # # ──║║──╔╣─╗║╚═╝║ ║╚═╝║──║║──║╚══╗╔╣─╗║║─║║║ # # ──╚╝──╚══╝╚═══╝ ╚═══╝──╚╝──╚═══╝╚══╝╚╝─╚═╝ # =========================================================== --]] Comando = "policial" ACL = "Policial" CorPainel = tocolor(225, 0, 0, 252) NomeDoServidor = "Brasil Mundo Avançado" ------------- Nome que você quer que apareça no painel ElementDataBanco = "TS:Banco" -------------- Element Data Do Banco, o mesmo da HUD ElementDataPorteDeArmas = "TS:PorteDeArmas" -------------- Element Data Do Porte de armas ElementHab1 = "DNL:Categoria(B)" ------------------- Element Data Habilitação Carro CaractereHab1 = "Sim" -------------- Se é "Sim" ou true ElementHab1 = "DNL:TestePratico" ------------------- Element Data Habilitação Carreta CaractereHab1 = "Sim" -------------- Se é "Sim" ou true ElementHab2 = "DNL:Categoria(A" ------------------- Element Data Habilitação Moto CaractereHab2 = "Sim" -------------- Se é "Sim" ou true ElementHab3 = "DNL:Categoria(C)" ------------------- Element Data Habilitação Caminhao CaractereHab3 = "Sim" -------------- Se é "Sim" ou true ElementHab3 = "DNL:Categoria(D)" ------------------- Element Data Habilitação Caminhao CaractereHab3 = "Sim" -------------- Se é "Sim" ou true ElementHab4 = "DNL:Categoria(E)" ------------------- Element Data Habilitação Caminhao CaractereHab4 = "Sim" -------------- Se é "Sim" ou true ElementHab5 = "DNL:TestePratico" ------------------- Element Data Habilitação Carreta CaractereHab5 = "Sim" -------------- Se é "Sim" ou true ElementRG = "ID" ------------------- Element Data RG ElementDataNascimento = "TS:DataDeNascimento" ------------------- Element Data de nascimento TiposDeMulta = { {"Infração Gravíssima", 5000}, ------------- Motivo da multa, Valor da multa {"Infração Grave", 4000}, ------------- Motivo da multa, Valor da multa {"Infração Média", 3000}, ------------- Motivo da multa, Valor da multa {"Infração Leve", 2000}, ------------- Motivo da multa, Valor da multa } e aki A CNH Entrar = createMarker(1111.70715, -1796.76624, 16.59375 -1, "cylinder", 1.2, 0, 255, 0, 90) Blip = createBlipAttachedTo ( Entrar, 36 ) setBlipVisibleDistance(Blip, 150) Sair = createMarker(-2026.97485, -104.28124, 1035.17188 -1, "cylinder", 1.2, 0, 255, 0, 90) setElementInterior(Sair, 3) Marker_Categoria = createMarker(-2033.13196, -117.45327, 1035.17188 -1, "cylinder", 1.2, 0, 255, 0, 90) setElementInterior(Marker_Categoria, 3) Marker_Multas = createMarker(-2031.19666, -115.17245, 1035.17188 -1, "cylinder", 1.2, 0, 255, 0, 90) setElementInterior(Marker_Multas, 3) function Entrar_Detran (source) setElementInterior(source, 3) setElementPosition(source, -2029.55017, -105.98931, 1035.17188) setElementDimension(source, 0) end addEventHandler("onMarkerHit", Entrar, Entrar_Detran) function Sair_Detran (source) setElementInterior(source, 0) setElementPosition(source, 1109.35291, -1796.64258, 16.59375) setElementDimension(source, 0) end addEventHandler("onMarkerHit", Sair, Sair_Detran) function Abrir_Prova(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000✘ #ffffffDetran #ff0000✘➺ #FFFFFFVocê não pode Fazer Prova Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Marker_Categoria) then triggerClientEvent(source,"DNL:AbrirCategorias",source) end end addEventHandler( "onMarkerHit", Marker_Categoria, Abrir_Prova ) function PagarMultas(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000✘ #ffffffDetran #ff0000✘➺ #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Marker_Multas) then triggerClientEvent(source,"DNL:Abrir_Multas",source) end end addEventHandler( "onMarkerHit", Marker_Multas, PagarMultas ) -------- Carregar_Dados -------- function Carregar_Dados () local Account = getPlayerAccount(source) local HabilitacaoA = getAccountData (Account, "DNL:Categoria(A)") local HabilitacaoB = getAccountData (Account, "DNL:Categoria(B)") local HabilitacaoC = getAccountData (Account, "DNL:Categoria(C)") local HabilitacaoD = getAccountData (Account, "DNL:Categoria(D)") local HabilitacaoE = getAccountData (Account, "DNL:Categoria(E)") setElementData(source, "DNL:Categoria(A)", HabilitacaoA) setElementData(source, "DNL:Categoria(B)", HabilitacaoB) setElementData(source, "DNL:Categoria(C)", HabilitacaoC) setElementData(source, "DNL:Categoria(D)", HabilitacaoD) setElementData(source, "DNL:Categoria(E)", HabilitacaoE) end addEventHandler("onPlayerLogin", root, Carregar_Dados) function carteira (source, cmd, pname) local accountname = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accountname, aclGetGroup("Everyone")) then -- Grupo permitido a usar o comando local Player_2 = getPlayerFromPartialName(pname) if isElement(Player_2) then local Account = getPlayerAccount(Player_2) setElementData(Player_2, "DNL:Categoria(A)", true) setAccountData ( Account, "DNL:Categoria(A)", true) setElementData(Player_2, "DNL:Categoria(B)", true) setAccountData ( Account, "DNL:Categoria(B)", true) setElementData(Player_2, "DNL:Categoria(C)", true) setAccountData ( Account, "DNL:Categoria(C)", true) setElementData(Player_2, "DNL:Categoria(D)", true) setAccountData ( Account, "DNL:Categoria(D)", true) setElementData(Player_2, "DNL:Categoria(E)", true) setAccountData ( Account, "DNL:Categoria(E)", true) else outputChatBox ( "#ff0000✘ #ffffffERRO #ff0000✘➺ #ffffff O Jogador(a) Não Foi Encontrado!", source, 255,255,255,true) end else outputChatBox ( "#ff0000✘ #ffffffERRO #ff0000✘➺ #FFFFFFVocê não tem permissão para utilizar este comando!", source, 255,255,255,true) end end addCommandHandler("carteira", carteira) -------------------------------------------------------------------- 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 -------------------------------------------------------------------- Outra parte do Script --[[ ===================================== --]] -- = CATEGORIA A = -- --[[ ===================================== --]] function CNHMoto (source, seat) if getElementData( source, "DNL:TestePratico", true ) then return end if getElementData(source, "DNL:Categoria(A)", true) then return end local temp = getPedOccupiedVehicle(source) if (getElementModel (temp) == 581) or (getElementModel (temp) == 462) or (getElementModel (temp) == 521) or (getElementModel (temp) == 463) or (getElementModel (temp) == 522) or (getElementModel (temp) == 461) or (getElementModel (temp) == 448) or (getElementModel (temp) == 468) or (getElementModel (temp) == 586) or (getElementModel (temp) == 523) then -- if getVehicleOccupant(temp,0) then if seat == 0 then triggerClientEvent(source,"CNH:AlertaMoto",source) end end end addEventHandler ( "onVehicleEnter", root, CNHMoto ) --[[ ===================================== --]] -- = CATEGORIA B = -- --[[ ===================================== --]] function CNHCarro (source, seat) if getElementData( source, "DNL:TestePratico", true ) then return end if getElementData(source, "DNL:Categoria(B)", true) then return end local temp = getPedOccupiedVehicle(source) if (getElementModel (temp) == 602) or (getElementModel (temp) == 496) or (getElementModel (temp) == 525) or (getElementModel (temp) == 401) or (getElementModel (temp) == 518) or (getElementModel (temp) == 527) or (getElementModel (temp) == 589) or (getElementModel (temp) == 419) or (getElementModel (temp) == 587) or (getElementModel (temp) == 533) or (getElementModel (temp) == 526) or (getElementModel (temp) == 474) or (getElementModel (temp) == 545) or (getElementModel (temp) == 517) or (getElementModel (temp) == 410) or (getElementModel (temp) == 600) or (getElementModel (temp) == 436) or (getElementModel (temp) == 439) or (getElementModel (temp) == 549) or (getElementModel (temp) == 491) or (getElementModel (temp) == 445) or (getElementModel (temp) == 604) or (getElementModel (temp) == 507) or (getElementModel (temp) == 585) or (getElementModel (temp) == 466) or (getElementModel (temp) == 492) or (getElementModel (temp) == 546) or (getElementModel (temp) == 551) or (getElementModel (temp) == 516) or (getElementModel (temp) == 467) or (getElementModel (temp) == 426) or (getElementModel (temp) == 547) or (getElementModel (temp) == 405) or (getElementModel (temp) == 580) or (getElementModel (temp) == 409) or (getElementModel (temp) == 550) or (getElementModel (temp) == 566) or (getElementModel (temp) == 540) or (getElementModel (temp) == 421) or (getElementModel (temp) == 529) or (getElementModel (temp) == 485) or (getElementModel (temp) == 438) or (getElementModel (temp) == 574) or (getElementModel (temp) == 420) or (getElementModel (temp) == 490) or (getElementModel (temp) == 470) or (getElementModel (temp) == 596) or (getElementModel (temp) == 598) or (getElementModel (temp) == 599) or (getElementModel (temp) == 597) or (getElementModel (temp) == 531) or (getElementModel (temp) == 536) or (getElementModel (temp) == 575) or (getElementModel (temp) == 534) or (getElementModel (temp) == 567) or (getElementModel (temp) == 535) or (getElementModel (temp) == 576) or (getElementModel (temp) == 429) or (getElementModel (temp) == 541) or (getElementModel (temp) == 415) or (getElementModel (temp) == 480) or (getElementModel (temp) == 562) or (getElementModel (temp) == 565) or (getElementModel (temp) == 434) or (getElementModel (temp) == 494) or (getElementModel (temp) == 502) or (getElementModel (temp) == 503) or (getElementModel (temp) == 411) or (getElementModel (temp) == 559) or (getElementModel (temp) == 561) or (getElementModel (temp) == 560) or (getElementModel (temp) == 506) or (getElementModel (temp) == 451) or (getElementModel (temp) == 558) or (getElementModel (temp) == 555) or (getElementModel (temp) == 477) or (getElementModel (temp) == 568) or (getElementModel (temp) == 424) or (getElementModel (temp) == 504) or (getElementModel (temp) == 457) or (getElementModel (temp) == 483) or (getElementModel (temp) == 571) or (getElementModel (temp) == 500) or (getElementModel (temp) == 444) or (getElementModel (temp) == 556) or (getElementModel (temp) == 557) or (getElementModel (temp) == 471) or (getElementModel (temp) == 495) or (getElementModel (temp) == 539) or (getElementModel (temp) == 459) or (getElementModel (temp) == 422) or (getElementModel (temp) == 482) or (getElementModel (temp) == 605) or (getElementModel (temp) == 530) or (getElementModel (temp) == 418) or (getElementModel (temp) == 572) or (getElementModel (temp) == 582) or (getElementModel (temp) == 413) or (getElementModel (temp) == 440) or (getElementModel (temp) == 543) or (getElementModel (temp) == 583) or (getElementModel (temp) == 554) or (getElementModel (temp) == 579) or (getElementModel (temp) == 400) or (getElementModel (temp) == 404) or (getElementModel (temp) == 489) or (getElementModel (temp) == 505) or (getElementModel (temp) == 479) or (getElementModel (temp) == 422) or (getElementModel (temp) == 458) or (getElementModel (temp) == 402) then --if getVehicleOccupant(temp,0) then if seat == 0 then triggerClientEvent(source,"CNH:AlertaCar",source) end end end addEventHandler ( "onVehicleEnter", root, CNHCarro ) --[[ ===================================== --]] -- = CATEGORIA C = -- --[[ ===================================== --]] function CNHCaminhao (source, seat) if getElementData( source, "DNL:TestePratico", true ) then return end if getElementData(source, "DNL:Categoria(C)", true) then return end local temp = getPedOccupiedVehicle(source) if (getElementModel (temp) == 408) or (getElementModel (temp) == 552) or (getElementModel (temp) == 416) or (getElementModel (temp) == 433) or (getElementModel (temp) == 427) or (getElementModel (temp) == 528) or (getElementModel (temp) == 407) or (getElementModel (temp) == 544) or (getElementModel (temp) == 601) or (getElementModel (temp) == 428) or (getElementModel (temp) == 499) or (getElementModel (temp) == 609) or (getElementModel (temp) == 498) or (getElementModel (temp) == 524) or (getElementModel (temp) == 532) or (getElementModel (temp) == 578) or (getElementModel (temp) == 486) or (getElementModel (temp) == 406) or (getElementModel (temp) == 573) or (getElementModel (temp) == 455) or (getElementModel (temp) == 588) or (getElementModel (temp) == 423) or (getElementModel (temp) == 414) or (getElementModel (temp) == 443) or (getElementModel (temp) == 456) or (getElementModel (temp) == 478) or (getElementModel (temp) == 508) or (getElementModel (temp) == 431) or (getElementModel (temp) == 437) then if seat == 0 then triggerClientEvent(source,"CNH:AlertaCAM",source) end end end addEventHandler ( "onVehicleEnter", root, CNHCaminhao ) --[[ ===================================== --]] -- = CATEGORIA D = -- --[[ ===================================== --]] function CNHCarreta (source, seat) if getElementData( source, "DNL:TestePratico", true ) then return end if getElementData(source, "DNL:Categoria(D)", true) then return end local temp = getPedOccupiedVehicle(source) if (getElementModel (temp) == 403) or (getElementModel (temp) == 515) or (getElementModel (temp) == 514) then if seat == 0 then triggerClientEvent(source,"CNH:AlertaCARRETA",source) end end end addEventHandler ( "onVehicleEnter", root, CNHCarreta ) --[[ ===================================== --]] -- = CATEGORIA E = -- --[[ ===================================== --]] function CNHHeli (source, seat) if getElementData( source, "DNL:TestePratico", true ) then return end if getElementData(source, "DNL:Categoria(E)", true) then return end local temp = getPedOccupiedVehicle(source) if (getElementModel (temp) == 548) or (getElementModel (temp) == 425) or (getElementModel (temp) == 417) or (getElementModel (temp) == 487) or (getElementModel (temp) == 488) or (getElementModel (temp) == 497) or (getElementModel (temp) == 563) or (getElementModel (temp) == 447) or (getElementModel (temp) == 469) then if seat == 0 then triggerClientEvent(source,"CNH:AlertaHeli",source) end end end addEventHandler ( "onVehicleEnter", root, CNHHeli ) --[[ ===================================== --]] -- = REMOVER CNH = -- --[[ ===================================== --]] function RemCNH (source, seat) if seat == 0 then triggerClientEvent(source,"CNH:AlertaMoto_Off",source) triggerClientEvent(source,"CNH:AlertaCar_Off",source) triggerClientEvent(source,"CNH:AlertaCAM_Off",source) triggerClientEvent(source,"CNH:AlertaCARRETA_Off",source) triggerClientEvent(source,"CNH:AlertaHeli_Off",source) end end addEventHandler ( "onVehicleExit", root, RemCNH )
  8. um script da o seguinte erro [servidor]\[servidor]\[Scripts]\[AtivarVip\caioS.Lua:14: <min_mtaversion> section in the meta.xml is incorrect or missing (expected at least server 1.5.4-9.11413 becayse 'formFields' is begin used Script aki local url = "https://discordapp.com/api/webhooks/1133572830953476227/ja3_b-h9pOGeJIxAcLJfc2FQQWUOUtXbR-614F93FwhTM-b4mSg96oLjyp2DNfRCoNsb" ---- Coloque o link da sua webhook entre as "aspas" -------- --> --> --> --> --> "LOGS" nao mexa aqui <-- <-- <-- <-- <-- function messageDiscord(message, link) sendOptions = { queueName = "dcq", connectionAttempts = 3, connectTimeout = 5000, formFields = { content=""..message.."" }, } fetchRemote(link, sendOptions, function () return end) end --> --> --> --> --> LOGS <-- <-- <-- <-- <-- function messageS(player, message, tipo) exports['FR_DxMessages']:addBox(player, message, tipo) ----------- altere para sua infobox----- end function RegisterEvent(event, ...) addEvent(event, true) addEventHandler(event, ...) end addEventHandler('onResourceStart', getResourceRootElement(getThisResource()), function () connection = dbConnect('sqlite', 'dados.sqlite') dbExec(connection, 'create table if not exists key (key, vip, dias)') dbExec(connection, 'create table if not exists keyPoints (key, amount)') dbExec(connection, 'create table if not exists vips (conta, vip, tempo)') end ) setTimer( function ( ) local logins = dbPoll(dbQuery(connection, 'select * from vips'), - 1) if (#logins ~= 0) then for i, v in ipairs(logins) do if (v['tempo'] < 11000) then aclGroupRemoveObject(aclGetGroup(v['vip']), 'user.'..v['conta']) dbExec(connection, 'delete from vips where conta = ? and vip = ?', v['conta'], v['vip']) else dbExec(connection, 'update vips set tempo = ? where conta = ? and vip = ?', (tonumber(v['tempo']) - 10000), v['conta'], v['vip']) end end end end , 10000, 0) function getPlayerAdmin (player) for i,v in ipairs(config.acl) do if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then return true end end return false end function getVipExists (vip) vips = {'Omega', 'Sigma', 'Epsylon', 'Alpha'} for i,v in ipairs(vips) do if (v == vip) then return true end end return false end addCommandHandler('gerarkey', function(player, _, vip, dias) if getPlayerAdmin(player) then if (vip) and (dias) then if getVipExists(vip) then local seconds = (dias * 86400000) local key = gerarKey() local keys = dbPoll(dbQuery(connection, 'select * from key where key = ?', key), - 1) if (#keys == 0) then dbExec(connection, 'insert into key (key, vip, dias) values(?, ?, ?)', tostring(key), tostring(vip), tonumber(seconds)) triggerClientEvent(player, 'copyKey', player, tostring(key)) messageS(player, 'Você gerou uma key com o vip ' .. vip .. ' por '..dias..' dias.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Key gerada**\n**Vip:**`".. vip .."`\n**Dias:**`".. dias .."`\n**key:**||".. key .."||\n⇌--------------------⇌ ", ""..url.."") messageS(player, 'A key foi copiada, utilize (ctrl + v) para colar.', 'info') else messageS(player, 'Ocorreu um erro inesperado na hora de criar a key, tente novamente em alguns segundos.', 'success') end else messageS(player, 'Você precisa digitar algum dos vips atuais.', 'error') end end end end ) addCommandHandler('gerarpontos', function(player, _, amount) if getPlayerAdmin(player) then if tonumber(amount) then local key = gerarKey() local keys = dbPoll(dbQuery(connection, 'select * from keyPoints where key = ?', key), - 1) if (#keys == 0) then dbExec(connection, 'insert into keyPoints (key, amount) values(?, ?)', tostring(key), tonumber(amount)) triggerClientEvent(player, 'copyKey', player, tostring(key)) messageS(player, 'Você gerou uma key com ' .. amount .. ' vpoints.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Moedas Geradas**\n**Moedas:**`"..amount.."` \n**key:**||".. key .."||\n⇌--------------------⇌ ", ""..url.."") messageS(player, 'A key foi copiada, utilize (ctrl + v) para colar.', 'info') else messageS(player, 'Esta key já existe.', 'info') end end end end ) addCommandHandler('usarpontos', function (player, _, key) if key then local keys = dbPoll(dbQuery(connection, 'select * from keyPoints where key = ?', key), - 1) if (#keys ~= 0) then setElementData(player, 'moneycoins', (getElementData(player, 'moneycoins') or 0) + tonumber(keys[1]['amount'])) for i, v in ipairs(getElementsByType('player')) do triggerClientEvent(v, 'Caio.onDrawTextAtivado2', v, keys[1]['amount'], getPlayerName(player)) end messageS(player, 'Você ativou a key e recebeu ' .. keys[1]['amount'] .. ' de vPoints', 'success') dbExec(connection, 'delete from keyPoints where key = ?', key) else messageS(player, 'Esta key não existe ou já foi utilizada.', 'info') end else outputChatBox('Syntax error: /usarpontos [Key]') end end ) addCommandHandler('usarkey', function (player, _, key) if (key) then local keys = dbPoll(dbQuery(connection, 'select * from key where key = ?', key), - 1) if (#keys ~= 0) and (type(keys) == 'table') then local dados = dbPoll(dbQuery(connection, 'select * from vips where conta = ? and vip = ?', getAccountName(getPlayerAccount(player)), keys[1]['vip']), - 1) if (#dados == 0) then dbExec(connection, 'insert into vips (conta, vip, tempo) values(?, ?, ?)', getAccountName(getPlayerAccount(player)), keys[1]['vip'], keys[1]['dias']) aclGroupAddObject(aclGetGroup(keys[1]['vip']), 'user.'..getAccountName(getPlayerAccount(player))) messageS(player, 'Você utilizou a key e recebeu um vip '..keys[1]['vip']..' por '..(keys[1]['dias'] / 86400000)..' dias.', 'success') for i,v in ipairs(getElementsByType('player')) do triggerClientEvent(v, 'Caio.onDrawTextAtivado', v, keys[1]['vip'], getPlayerName(player)) end givePlayerMoney(player, (config[tostring(keys[1]['vip'])] or 0)) dbExec(connection, 'delete from key where key = ?', key) else messageS(player, 'Você já possui esse vip.', 'warning') end else messageS(player, 'Esta key não existe', 'warning') end else messageS(player, 'Você precisa digitar a key', 'warning') end end ) addCommandHandler('gerenciador', function (player) if getPlayerAdmin(player) then triggerClientEvent(player, 'Caio.onOpenGerenciar', player) local vips = dbPoll(dbQuery(connection, 'select * from vips'), - 1) local keys = dbPoll(dbQuery(connection, 'select * from key'), - 1) if (keys ~= 0) then for i,v in ipairs(keys) do triggerClientEvent(player, 'Caio.onInsertTableKey', player, v['key'], v['vip'], math.floor(v['dias'] / 86400000)) end end if (vips ~= 0) then for i,v in ipairs(vips) do triggerClientEvent(player, 'Caio.onInsertTableVip', player, v['conta'], v['vip'], math.floor(v['tempo'] / 86400000)) end end end end ) RegisterEvent('Caio.onRemoveKey', root, function (player, key, index) if (key) and (index) then local keys = dbPoll(dbQuery(connection, 'select * from key where key = ?', key), - 1) if (#keys ~= 0) and (type(keys) == 'table') then dbExec(connection, 'delete from key where key = ?', key) messageS(player, 'Você deletou com sucesso esta key.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Key Excluida**\n**Key:**`"..key.."`\n⇌--------------------⇌", ""..url.."") triggerClientEvent(player, 'Caio.onOpenGerenciar', player) else messageS(player, 'Ocorreu um erro ao remover esta key.', 'error') end end end ) RegisterEvent('Caio.onRemoveVip', root, function (player, login, vip, index) if (login) and (vip) then local result = dbPoll(dbQuery(connection, 'select * from vips where conta = ? and vip = ?', tostring(login), tostring(vip)), - 1) if (#result ~= 0) then aclGroupRemoveObject(aclGetGroup(tostring(vip)), 'user.'..tostring(login)) dbExec(connection, 'delete from vips where conta = ? and vip = ?', tostring(login), tostring(vip)) messageS(player, 'Você removeu o vip '..vip..' do usuário '..login..'.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Vip removido**\n**Login:** `"..login.."`\n**Vip:**`"..vip.."`\n⇌--------------------⇌ ", ""..url.."") triggerClientEvent(player, 'Caio.onOpenGerenciar', player) else messageS(player, 'Ocorreu um erro na hora de remover o vip.', 'error') end end end ) function gerarKey() letters = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} local sas = '' for i = 1, 10 do sas = sas .. letters[math.random(1, #letters)] end return sas end https://imgur.com/78DOMQj
  9. queria por em meu servidor 2 empregos que usam acl uber e mecanico ambos estao localizados na msm agencia consegui fazer com 1 porem quando tento adicionar outro nao funciona Scrip abaixo --[[ ><><><><><><><><><><><><><><><><><><><>< >< Pegar Trabalho >< ><><><><><><><><><><><><><><><><><><><>< --]] function Pegar_Emprego (source, Trab, Level, Hab) local Trabalho = getElementData ( source, "Emprego" ) or "Desempregado" local Habilicao = getElementData ( source, "DNL:Categoria("..Hab..")") local Level_Player = tonumber(getElementData(source, "Level")) or 0 if Level_Player >= tonumber(Level) then if Trabalho == Trab then triggerClientEvent(source, "addNotification", root, "INFO: Você Já Trabalha Como "..Trab.."", "info") return end if Habilicao == false then triggerClientEvent(source, "addNotification", root, "Erro: Você Não Tem Habilitação ("..Hab..") e Não Pode Trabalhar Como ("..Trab..")", "erro") return end setElementData ( source, "Emprego", Trab ) triggerClientEvent(source, "addNotification", root, "INFO: Você Agora Trabalha de "..Trab.."", "info") else triggerClientEvent(source, "addNotification", root, "Erro: Seu Level é Muito Baixo e Você Não Pode Trabalhar Como "..Trab.."", "erro") end end addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Pegar_Emprego (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name local Emprego = getElementData ( playerSource, "Emprego" ) if Emprego == "Mecanico" then aclGroupAddObject (aclGetGroup("Mecanico"), "user."..accName) outputChatBox ("Parabéns! Agora você está trabalhando de Mecanico!", playerSource, 0, 255, 0,true) outputChatBox ("Va para o T marcado no mapa proximo a DP!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Sair_ACL (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Mecanico" ) ) then -- Does he have access to Admin functions? aclGroupRemoveObject (aclGetGroup("Mecanico"), "user."..accName) outputChatBox ("Você não está trabalhando de Mecanico!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pedir_Demissao", true) addEventHandler("DNL:Pedir_Demissao", root, Sair_ACL) addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Pegar_Emprego (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name local Emprego = getElementData ( playerSource, "Emprego" ) if Emprego == "Uber" then aclGroupAddObject (aclGetGroup("Uber"), "user."..accName) outputChatBox ("Parabéns! Agora você está trabalhando de Uber!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Sair_ACL (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Uber" ) ) then -- Does he have access to Admin functions? aclGroupRemoveObject (aclGetGroup("Uber"), "user."..accName) outputChatBox ("Você não está trabalhando de Uber!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pedir_Demissao", true) addEventHandler("DNL:Pedir_Demissao", root, Sair_ACL) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Demissao Trabalho >< ><><><><><><><><><><><><><><><><><><><>< --]] function Pedir_Demissao (source) local Trabalho = getElementData ( source, "Emprego" ) or "Desempregado" if Trabalho == "Desempregado" then triggerClientEvent(source, "addNotification", root, "Erro: Você não está empregado para se demitir.", "erro") return end setElementData ( source, "Emprego", "Desempregado" ) triggerClientEvent(source, "addNotification", root, "Sucesso: Você Se Demitiu Do Emprego de "..Trabalho.."", "sucesso") end addEvent("DNL:Pedir_Demissao", true) addEventHandler("DNL:Pedir_Demissao", root, Pedir_Demissao)
  10. Crazy

    access control list

    access control list hello I'm having problems configuring my acl because I can't limit them ex wanted moderator q edits only acl of bases but on the contrary, the moderator manages to self-level up to the owner (console) can anyone help me limit this??
  11. n consigo configurar acl alguem me ajuda prfv necessito de ajuda pois n consigo configurar os cargos certinhos ex queria q o moderador edite somente os grupos de bases mas n consigo pois n consigo limitar isso ex moderador consegue se auto upar para dono(console) caso alguem saiba como resolve eu agredeceria mt de coraçao 2 dias tentando fazer isso
×
×
  • Create New...