-
Posts
66 -
Joined
-
Last visited
Everything posted by VictorScripting
-
como faço pra dizer que o dataname é o getPlayerMoney ?
-
Olá bom dia então pessoal tenho um mod que quanto ocorre uma transação de dinheiro ele faz um som. Mais ele funcionava com getElementData e eu mudei para getPlayerMoney, ele n funcionou aew fui mexendo até conseguir arrumar mais fica fazendo um som toda hora como se estivesse caindo dinheiro direto !!!!! addEventHandler("onClientElementDataChange", root, function(dataName, oldValue) if source == localPlayer then local newValue = getPlayerMoney(source) or 0 if newValue then moneyTick = getTickCount() + 5000 moneyChange = math.abs(newValue - oldValue) if newValue < oldValue then moneyChange = "-$"..moneyChange cor[2] = tocolor(255, 0, 0, 255) else moneyChange = "+$"..moneyChange cor[2] = tocolor(0, 255, 0, 255) end playSound("money.mp3", false) end elseif source == localPlayer then --loadStats() end end)
-
sobre a questão do mta e etc eu sei só desejo saber o que tanto devo usar para painel quero estudar painel dx em qustão de abrir o painel e o uso dele no caso o do hud é mt fácil pois só usa o evento onClientRender eu quero saber mesmo o que mais devo usar como usar o onClientMarker para abrir o painel e etc....
-
ENTÃO DEPOIS DE APRENDER A FAZER DXS EU FIZ VÁRIOS HUDS E ETC... MAIS AGORA QUERO FAZER UM SISTEMA DE INVENTARIO + LOJA PARA A GALERA DA COMUNIDADE MTA BRASIL MAIS.... QUERIA SABER AS FUNÇÕES QUE DEVEM SER USADAS PARA: ABRIR O PAINEL PELO MARKER, ABRIR OUTRO PAINEL POR OUTRO MARKER E ABRIR UM PAINEL POR UMA KEY BIND, TAMBÉM QUERO AS FUNÇÕES PARA USAR QUANDO: O MOUSE PASSAR SOBRE OS BOTÕES, E O QUE VAI ACONTECER QUANDO O MOUSE CLICAR, QUERO ESSAS FUNÇÕES DESDE JÁ AGRADEÇO A COMPREENSÃO. SE PUDER MANDAR LINKS DA WIKI TBM ACEITO.
-
Então galera sou novo na comunidade to começando a fazer meus scripts agora eu queria aprender sobre o que significa e quando devo usar esses elementos que tem nas funções como: source, root, cmd, player, theplayer e etc... não sei o que quer dizer e tem funções que nem usam só botam "function arroz()" e queria saber claramente o que é esses elementos.
-
mais ja botei como vc disse mais n está colorindo '-' a obg agr foi
-
Limitar quantidade de conta por serial
VictorScripting replied to WeeD1's topic in Programação em Lua
local serial = getPlayerSerial(player) local accounts = getAccountsBySerial(serial) if accounts >= 1 then -- se a variável accounts for maior ou igual que 1 então.... [[-- Bota o que vai acontece aqui dentro ---------------------------------------- ---------------------------------------- --------------------------------------]] else -- ou seja caso contrario se a variável accounts não maior ou igual que 1 então... [[-- Bota o que vai acontece aqui dentro ---------------------------------------- ---------------------------------------- --------------------------------------]] bote isso dentro da sua função e bote o que vai acontece com essa IF e essa ELSE -
Limitar quantidade de conta por serial
VictorScripting replied to WeeD1's topic in Programação em Lua
https://wiki.multitheftauto.com/wiki/GetAccountsBySerial -
n mudou nd ainda fica aparecendo o #hex fica Victor_#00ff00Scripting
-
Ajudar com este script de Agencia
VictorScripting replied to TavinhoMTA's topic in Programação em Lua
accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then é assim que se deve usar este é um exemplo do próprio wiki -
Então fiz uma hud que mostra o nome do jogador mais quando tem #hex ou seja ex: Victor_#ff0000Scripting | o nome não fica colorido no hud mais fica mostrando os códicos '-' eu quero uma das duas ou que tira os códico ou que deixe colorido e tire o códico dxDrawText(""..Nome, 1257, 69, 1388, 97, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false) essa é só a linha do dxDrawnText mais vou botar a variável também: local Nome = getPlayerName(localPlayer) ja está tudo certo mais acontece o erro citado acima
-
opa amigo chama no PV
-
isso está errado, não o que você quer fazer mais tem que mencionar que irá receber isso '-', tem como mandar o script completo ?
-
AMIGO PARA FACILITAR FIZ ISSO: function Funcionar (source) local Money_Pagamento = 1000 local Money_Pagamento190 = 5000 -- pagamento do grupo 190, só editar o valor !!! local Money_Pagamento191 = 8000 -- mesma coisa de cima só mudei pra 191 pra vc saber de qual grupo é !!! if getElementData(thePlayer, "char.factionID") == 0 then -- se o player não for de nenhuma facção no caso = 0 Então vai aconetecer a linha de comandos abaixo: outputChatBox ('#FF6565 -------- Pagamento do Banco --------',getRootElement(),255,255,255,true) outputChatBox (' ',getRootElement(),255,255,255,true) outputChatBox ('#80FF00 O Banco Lhe Pagou: #FFFFFF'..Money_Pagamento,getRootElement(),255,255,255,true) outputChatBox (' ',getRootElement(),255,255,255,true) givePlayerMoney (getRootElement(),Money_Pagamento) elseif getElementData(thePlayer, "char.factionID") == 190 then outputChatBox ('#FF6565 -------- Pagamento do Banco --------',getRootElement(),255,255,255,true) outputChatBox (' ',getRootElement(),255,255,255,true) outputChatBox ('#80FF00 O Banco Lhe Pagou: #FFFFFF'..Money_Pagamento,getRootElement(),255,255,255,true) outputChatBox (' ',getRootElement(),255,255,255,true) outputChatBox ('#80FF00 Seu grupo lhe pagou: #FFFFFF'..Money_Pagamento190,getRootElement(),255,255,255,true) -- no caso alir, irá aparecer a mesagem mostrando o valor da variável: local Money_Pagamento190 = 5000 givePlayerMoney (getRootElement(),Money_Pagamento190 + Money_Pagamento) -- irá dar o dinheiro para o player, ele vai dar o salário normal + o dinheiro do grupo !!!! end setTimer (Funcionar,5000,0) -- caso for usar mais grupo é so adicionar um nova variavel e criar a elseif !!!!! ESTÁ TUDO EXPLICANDO AEW (NÃO TESTEI) ESPERO TER LHE AJUDADO
-
está aew amigo mais caso vc está querendo retirar pq n sabe botar a mensagem do level no painel eu lhe ajudo mais está aqui: PASTEBINnew pasteAPI tools faq deals search... Guest User - Public Pastes Untitled Make | 0 sec ago Untitled 13 sec ago rtecord 18 sec ago Untitled 36 sec ago Untitled 53 sec ago Untitled 57 sec ago Untitled C++ | 1 min ago Untitled 1 min ago SHARE TWEET Untitled DJANGOANTONIO3 OCT 2ND, 2019 71 NEVER Not a member of Pastebin yet? Sign Up, it unlocks many cool features! rawdownloadcloneembedreportprinttext 10.99 KB --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # EDIT:HIQUEC # # # # # ################################################ --]] local AgenciaDeEmpregos = createMarker ( -2033.092, -117.435, 1035.172 -1, "cylinder", 1.2, 20, 70, 230, 95 ) setElementInterior ( AgenciaDeEmpregos, 3 ) setElementDimension ( AgenciaDeEmpregos, 0 ) --local Entrada = createMarker ( 1153.971, -1772.248, 16.594 +0.7, "arrow", 1.2, 20, 70, 230, 95 ) local Entrada = createMarker(1153.971, -1772.248, 16.594 -1 ,"cylinder",1.1,0,108,255, 0) AgenPickup = createPickup ( 1153.971, -1772.248, 16.594, 3, 1210, 1) local EntradaBlip = createBlipAttachedTo ( Entrada, 23 ) setBlipVisibleDistance ( EntradaBlip, 150 ) local Saida = createMarker ( -2029.7189941406,-119.60523223877,1035.171875 +0.7, "arrow", 1.2, 20, 70, 230, 95 ) setElementInterior ( Saida, 3 ) setElementDimension ( Saida, 0 ) -- local EntregadorDeJornal = createBlip( 783.25146, -1327.65601, 13.54688, 0 ) setElementVisibleTo ( EntregadorDeJornal, root, false ) local EntregadorDeJornalMarker = createMarker ( 783.25146, -1327.65601, 13.54688 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local PizzaBoy = createBlip( 2101.46094, -1801.56970, 13.55469, 0 ) setElementVisibleTo ( PizzaBoy, root, false ) local PizzaBoyMarker = createMarker ( 2101.46094, -1801.56970, 13.55469 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local MotoristaDeUber = createBlip( 1219.864, -1812.912, 16.594, 0 ) setElementVisibleTo ( MotoristaDeUber, root, false ) local MotoristaDeUberMarker = createMarker ( 1219.864, -1812.912, 16.594 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local EntregadorDeMalote = createBlip( 1219.506, -1812.57, 16.594, 0 ) setElementVisibleTo ( EntregadorDeMalote, root, false ) local EntregadorDeMaloteMarker = createMarker ( 1219.506, -1812.57, 16.594 -1, "cylinder", 1.2, 20, 70, 230, 0 ) --local Mecanico = createBlip( 196.94911, -232.34215, 1.55537, 0 ) --setElementVisibleTo ( Mecanico, root, false ) --local MecanicoMarker = createMarker ( 196.94911, -232.34215, 1.55537 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local Petroleiro = createBlip( 283.75128, 1432.13159, 10.79398, 0 ) setElementVisibleTo ( Petroleiro, root, false ) local PetroleiroMarker = createMarker ( 283.75128, 1432.13159, 10.79398 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local MotoristaDeOnibus = createBlip( 2843.39136, 1293.83838, 11.39063, 0 ) setElementVisibleTo ( MotoristaDeOnibus, root, false ) local MotoristaDeOnibusMarker = createMarker ( 2843.39136, 1293.83838, 11.39063 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local PilotoDeAviao = createBlip( 1919.63525, -2641.47046, 13.54688, 0 ) setElementVisibleTo ( PilotoDeAviao, root, false ) local PilotoDeAviaoMarker = createMarker ( 1919.63525, -2641.47046, 13.54688 -1, "cylinder", 1.2, 20, 70, 230, 0 ) -- function emarker(marker,md) if (md) then if marker == Entrada then setTimer ( setElementInterior, 400, 1, source, 3 ) setTimer ( setElementDimension, 400, 1, source, 0 ) setTimer ( setElementPosition, 400, 1, source, -2027.1860351563,-105.67038726807,1035.171875 ) setTimer ( setElementRotation, 900, 1, source, 0, 0, 90 ) fadeCamera ( source, false, 0.1, 0, 0, 0 ) setTimer ( fadeCamera, 900, 1, source , true, 0.5 ) setTimer ( setCameraTarget, 900, 1, source ) end if marker == Saida then setTimer ( setElementInterior, 400, 1, source, 0 ) setTimer ( setElementDimension, 400, 1, source, 0 ) setTimer ( setElementPosition, 400, 1, source, 1153.7983398438,-1767.9436035156,16.59375 ) setTimer ( setElementRotation, 900, 1, source, 0, 0, 0 ) fadeCamera ( source, false, 0.1, 0, 0, 0 ) setTimer ( fadeCamera, 900, 1, source , true, 0.5 ) setTimer ( setCameraTarget, 900, 1, source ) end if marker == AgenciaDeEmpregos then if isPedInVehicle ( source ) then return end triggerClientEvent ( source, "AirNew>AbrirAgencia", root) end if marker == EntregadorDeJornalMarker or marker == PizzaBoyMarker or marker == MotoristaDeUberMarker or marker == PetroleiroMarker or marker == MotoristaDeOnibusMarker or marker == PilotoDeAviaoMarker or marker == EntregadorDeMaloteMarker then TudoInvisivel () end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == AgenciaDeEmpregos then triggerClientEvent ( source, "AirNew>FecharAgencia", root) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker)--]] function TudoInvisivel () setElementVisibleTo ( EntregadorDeJornal, source, false ) setElementVisibleTo ( EntregadorDeMalote, source, false ) setElementVisibleTo ( PizzaBoy, source, false ) setElementVisibleTo ( MotoristaDeUber, source, false ) setElementVisibleTo ( Petroleiro, source, false ) setElementVisibleTo ( MotoristaDeOnibus, source, false ) setElementVisibleTo ( PilotoDeAviao, source, false ) --setElementVisibleTo ( Mecanico, source, false ) end function EntregadorDeJornalAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( EntregadorDeJornal, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Entregador de Jornal" ) outputChatBox ( "Você foi aceito no Emprego de Entregador de Jornal", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) end end addEvent( "Encaminhar>EntregadorDeJornal", true ) addEventHandler( "Encaminhar>EntregadorDeJornal", getRootElement(), EntregadorDeJornalAirNew ) function EntregadorDeMaloteAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( EntregadorDeMalote, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Entregador de Malote" ) outputChatBox ( "Você foi aceito no Emprego de transportado de malote", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 30 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>EntregadorDeMalote", true ) addEventHandler( "Encaminhar>EntregadorDeMalote", getRootElement(), EntregadorDeMaloteAirNew ) function PizzaBoyAirNew () local Level = getElementData ( source, "Level" ) or 00 if Level >= 00 then TudoInvisivel () setElementVisibleTo ( PizzaBoy, source, true ) setElementData ( source, "AirNew>Encaminhamento", "PizzaBoy" ) outputChatBox ( "Você foi aceito no Emprego de PizzaBoy", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 05 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>PizzaBoy", true ) addEventHandler( "Encaminhar>PizzaBoy", getRootElement(), PizzaBoyAirNew ) function MotoristaDeUberAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( MotoristaDeUber, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Motorista de Uber" ) outputChatBox ( "Você foi aceito no Emprego de Motorista de Uber", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 10 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>MotoristaDeUber", true ) addEventHandler( "Encaminhar>MotoristaDeUber", getRootElement(), MotoristaDeUberAirNew ) --function MecanicoAirNew () --local Level = getElementData ( source, "Level" ) or 0 --if Level >= 0 then --TudoInvisivel () --setElementVisibleTo ( Mecanico, source, true ) --setElementData ( source, "AirNew>Encaminhamento", "Mecanico" ) --outputChatBox ( "Você foi aceito no Emprego de Mecânico", source, 255, 255, 255, true ) --outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) --setElementData ( source, "Emprego", false ) --end --end --addEvent( "Encaminhar>Mecanico", true ) --addEventHandler( "Encaminhar>Mecanico", getRootElement(), MecanicoAirNew ) function PetroleiroAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( Petroleiro, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Petroleiro" ) outputChatBox ( "Você foi aceito no Emprego de Petroleiro", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 15 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>Petroleiro", true ) addEventHandler( "Encaminhar>Petroleiro", getRootElement(), PetroleiroAirNew ) function MotoristaDeOnibusAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( MotoristaDeOnibus, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Motorista de Onibus" ) outputChatBox ( "Você foi aceito no Emprego de Motorista de Ônibus", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 20 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>MotoristaDeOnibus", true ) addEventHandler( "Encaminhar>MotoristaDeOnibus", getRootElement(), MotoristaDeOnibusAirNew ) function PilotoDeAviaoAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( PilotoDeAviao, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Piloto de Aviao" ) outputChatBox ( "Você foi aceito no Emprego de Piloto de Avião", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 25 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>PilotoDeAviao", true ) addEventHandler( "Encaminhar>PilotoDeAviao", getRootElement(), PilotoDeAviaoAirNew ) RAW Paste Data --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # EDIT:HIQUEC # # # # # ################################################ --]] local AgenciaDeEmpregos = createMarker ( -2033.092, -117.435, 1035.172 -1, "cylinder", 1.2, 20, 70, 230, 95 ) setElementInterior ( AgenciaDeEmpregos, 3 ) setElementDimension ( AgenciaDeEmpregos, 0 ) --local Entrada = createMarker ( 1153.971, -1772.248, 16.594 +0.7, "arrow", 1.2, 20, 70, 230, 95 ) local Entrada = createMarker(1153.971, -1772.248, 16.594 -1 ,"cylinder",1.1,0,108,255, 0) AgenPickup = createPickup ( 1153.971, -1772.248, 16.594, 3, 1210, 1) local EntradaBlip = createBlipAttachedTo ( Entrada, 23 ) setBlipVisibleDistance ( EntradaBlip, 150 ) local Saida = createMarker ( -2029.7189941406,-119.60523223877,1035.171875 +0.7, "arrow", 1.2, 20, 70, 230, 95 ) setElementInterior ( Saida, 3 ) setElementDimension ( Saida, 0 ) -- local EntregadorDeJornal = createBlip( 783.25146, -1327.65601, 13.54688, 0 ) setElementVisibleTo ( EntregadorDeJornal, root, false ) local EntregadorDeJornalMarker = createMarker ( 783.25146, -1327.65601, 13.54688 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local PizzaBoy = createBlip( 2101.46094, -1801.56970, 13.55469, 0 ) setElementVisibleTo ( PizzaBoy, root, false ) local PizzaBoyMarker = createMarker ( 2101.46094, -1801.56970, 13.55469 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local MotoristaDeUber = createBlip( 1219.864, -1812.912, 16.594, 0 ) setElementVisibleTo ( MotoristaDeUber, root, false ) local MotoristaDeUberMarker = createMarker ( 1219.864, -1812.912, 16.594 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local EntregadorDeMalote = createBlip( 1219.506, -1812.57, 16.594, 0 ) setElementVisibleTo ( EntregadorDeMalote, root, false ) local EntregadorDeMaloteMarker = createMarker ( 1219.506, -1812.57, 16.594 -1, "cylinder", 1.2, 20, 70, 230, 0 ) --local Mecanico = createBlip( 196.94911, -232.34215, 1.55537, 0 ) --setElementVisibleTo ( Mecanico, root, false ) --local MecanicoMarker = createMarker ( 196.94911, -232.34215, 1.55537 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local Petroleiro = createBlip( 283.75128, 1432.13159, 10.79398, 0 ) setElementVisibleTo ( Petroleiro, root, false ) local PetroleiroMarker = createMarker ( 283.75128, 1432.13159, 10.79398 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local MotoristaDeOnibus = createBlip( 2843.39136, 1293.83838, 11.39063, 0 ) setElementVisibleTo ( MotoristaDeOnibus, root, false ) local MotoristaDeOnibusMarker = createMarker ( 2843.39136, 1293.83838, 11.39063 -1, "cylinder", 1.2, 20, 70, 230, 0 ) local PilotoDeAviao = createBlip( 1919.63525, -2641.47046, 13.54688, 0 ) setElementVisibleTo ( PilotoDeAviao, root, false ) local PilotoDeAviaoMarker = createMarker ( 1919.63525, -2641.47046, 13.54688 -1, "cylinder", 1.2, 20, 70, 230, 0 ) -- function emarker(marker,md) if (md) then if marker == Entrada then setTimer ( setElementInterior, 400, 1, source, 3 ) setTimer ( setElementDimension, 400, 1, source, 0 ) setTimer ( setElementPosition, 400, 1, source, -2027.1860351563,-105.67038726807,1035.171875 ) setTimer ( setElementRotation, 900, 1, source, 0, 0, 90 ) fadeCamera ( source, false, 0.1, 0, 0, 0 ) setTimer ( fadeCamera, 900, 1, source , true, 0.5 ) setTimer ( setCameraTarget, 900, 1, source ) end if marker == Saida then setTimer ( setElementInterior, 400, 1, source, 0 ) setTimer ( setElementDimension, 400, 1, source, 0 ) setTimer ( setElementPosition, 400, 1, source, 1153.7983398438,-1767.9436035156,16.59375 ) setTimer ( setElementRotation, 900, 1, source, 0, 0, 0 ) fadeCamera ( source, false, 0.1, 0, 0, 0 ) setTimer ( fadeCamera, 900, 1, source , true, 0.5 ) setTimer ( setCameraTarget, 900, 1, source ) end if marker == AgenciaDeEmpregos then if isPedInVehicle ( source ) then return end triggerClientEvent ( source, "AirNew>AbrirAgencia", root) end if marker == EntregadorDeJornalMarker or marker == PizzaBoyMarker or marker == MotoristaDeUberMarker or marker == PetroleiroMarker or marker == MotoristaDeOnibusMarker or marker == PilotoDeAviaoMarker or marker == EntregadorDeMaloteMarker then TudoInvisivel () end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == AgenciaDeEmpregos then triggerClientEvent ( source, "AirNew>FecharAgencia", root) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker)--]] function TudoInvisivel () setElementVisibleTo ( EntregadorDeJornal, source, false ) setElementVisibleTo ( EntregadorDeMalote, source, false ) setElementVisibleTo ( PizzaBoy, source, false ) setElementVisibleTo ( MotoristaDeUber, source, false ) setElementVisibleTo ( Petroleiro, source, false ) setElementVisibleTo ( MotoristaDeOnibus, source, false ) setElementVisibleTo ( PilotoDeAviao, source, false ) --setElementVisibleTo ( Mecanico, source, false ) end function EntregadorDeJornalAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( EntregadorDeJornal, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Entregador de Jornal" ) outputChatBox ( "Você foi aceito no Emprego de Entregador de Jornal", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) end end addEvent( "Encaminhar>EntregadorDeJornal", true ) addEventHandler( "Encaminhar>EntregadorDeJornal", getRootElement(), EntregadorDeJornalAirNew ) function EntregadorDeMaloteAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( EntregadorDeMalote, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Entregador de Malote" ) outputChatBox ( "Você foi aceito no Emprego de transportado de malote", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 30 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>EntregadorDeMalote", true ) addEventHandler( "Encaminhar>EntregadorDeMalote", getRootElement(), EntregadorDeMaloteAirNew ) function PizzaBoyAirNew () local Level = getElementData ( source, "Level" ) or 05 if Level >= 05 then TudoInvisivel () setElementVisibleTo ( PizzaBoy, source, true ) setElementData ( source, "AirNew>Encaminhamento", "PizzaBoy" ) outputChatBox ( "Você foi aceito no Emprego de PizzaBoy", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 05 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>PizzaBoy", true ) addEventHandler( "Encaminhar>PizzaBoy", getRootElement(), PizzaBoyAirNew ) function MotoristaDeUberAirNew () local Level = getElementData ( source, "Level" ) or 10 if Level >= 10 then TudoInvisivel () setElementVisibleTo ( MotoristaDeUber, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Motorista de Uber" ) outputChatBox ( "Você foi aceito no Emprego de Motorista de Uber", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 10 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>MotoristaDeUber", true ) addEventHandler( "Encaminhar>MotoristaDeUber", getRootElement(), MotoristaDeUberAirNew ) --function MecanicoAirNew () --local Level = getElementData ( source, "Level" ) or 0 --if Level >= 0 then --TudoInvisivel () --setElementVisibleTo ( Mecanico, source, true ) --setElementData ( source, "AirNew>Encaminhamento", "Mecanico" ) --outputChatBox ( "Você foi aceito no Emprego de Mecânico", source, 255, 255, 255, true ) --outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) --setElementData ( source, "Emprego", false ) --end --end --addEvent( "Encaminhar>Mecanico", true ) --addEventHandler( "Encaminhar>Mecanico", getRootElement(), MecanicoAirNew ) function PetroleiroAirNew () local Level = getElementData ( source, "Level" ) or 15 if Level >= 15 then TudoInvisivel () setElementVisibleTo ( Petroleiro, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Petroleiro" ) outputChatBox ( "Você foi aceito no Emprego de Petroleiro", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 15 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>Petroleiro", true ) addEventHandler( "Encaminhar>Petroleiro", getRootElement(), PetroleiroAirNew ) function MotoristaDeOnibusAirNew () local Level = getElementData ( source, "Level" ) or 20 if Level >= 20 then TudoInvisivel () setElementVisibleTo ( MotoristaDeOnibus, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Motorista de Onibus" ) outputChatBox ( "Você foi aceito no Emprego de Motorista de Ônibus", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 20 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>MotoristaDeOnibus", true ) addEventHandler( "Encaminhar>MotoristaDeOnibus", getRootElement(), MotoristaDeOnibusAirNew ) function PilotoDeAviaoAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 25 then TudoInvisivel () setElementVisibleTo ( PilotoDeAviao, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Piloto de Aviao" ) outputChatBox ( "Você foi aceito no Emprego de Piloto de Avião", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) else outputChatBox ( "Você precisa ter level 25 para trabalhar!", source, 255, 255, 255, true ) end end addEvent( "Encaminhar>PilotoDeAviao", true ) addEventHandler( "Encaminhar>PilotoDeAviao", getRootElement(), PilotoDeAviaoAirNew ) --@ VICTOR SCRIPTING @ no caso o que fiz foi botar tudo 0
-
mais tipo as teclas n fufando pow mais tipo quando você compra não acontece nd só fecha o painel entendeu ?
-
posso te mandar o script no pv pra vc editar para mim ? porque esse script eu comprei entendeu e eu n sei como foi a ideia dele
-
pra isso você precisará de sql e o script completo eu acho '-'
-
ok ent eu mandei o server completo e o client só mande a função que está com o erro
-
Server: addEvent("onClientBuyVehicle", true) addEventHandler("onClientBuyVehicle", root, function(playerSource, model, price, r, g, b, r1, g1, b1) outputChatBox("#4169E1[Brasil PH]: #ffffffLembre-se de estacionar seu veiculo para que ele sejá salvo em nosso sistema", playerSource, 255, 255, 255, true) end end) addEvent("onClientBuyVehiclePP", true) addEventHandler("onClientBuyVehiclePP", root, function(playerSource, model, pp, r, g, b, r1, g1, b1) exports["ph_vehicle"]:createShopVehicle(playerSource, model, r, g, b, r1, g1, b1) outputChatBox("#4169E1[Brasil PH]: #ffffffLembre-se de estacionar seu veiculo para que ele sejá salvo em nosso sistema", playerSource, 255, 255, 255, true) end end) Client addEventHandler("onClientKey", root, function(key, source) if not source or not isShopActive then return end if key == "backspace" then exitShop() elseif key == "arrow_l" then if sellVehicles[currSelected - 1] then currSelected = currSelected - 1 setElementModel(shopVehicle, sellVehicles[currSelected][1]) else currSelected = #sellVehicles setElementModel(shopVehicle, sellVehicles[currSelected][1]) end elseif key == "arrow_r" then if sellVehicles[currSelected + 1] then currSelected = currSelected + 1 setElementModel(shopVehicle, sellVehicles[currSelected][1]) else currSelected = 1 setElementModel(shopVehicle, sellVehicles[currSelected][1]) end elseif key == "enter" then --limit rész if sellVehicles[currSelected][6] > 0 then if (#getPremiumVehicles(sellVehicles[currSelected][1]) or 0) >= sellVehicles[currSelected][6] then exports["ph_info"]:showBox("Esse veiculo atingiu o limiti maximo da loja","error") return end end ------------ if sellVehicles[currSelected][3] > tonumber(getElementData(localPlayer, "char.money")) then exports["ph_info"]:showBox("Dinheiro insuficiente","error") else local r,g,b,r1,g1,b1 = getVehicleColor(shopVehicle, true) triggerServerEvent("onClientBuyVehicle", localPlayer, localPlayer, sellVehicles[currSelected][1], sellVehicles[currSelected][3], r, g, b, r1, g1, b1) exitShop() end elseif key == "d" then if sellVehicles[currSelected][5] > tonumber(getElementData(localPlayer, "char.diamante")) then exports["ph_info"]:showBox("Diamante insuficiente","error") else local r,g,b,r1,g1,b1 = getVehicleColor(shopVehicle, true) triggerServerEvent("onClientBuyVehiclePP", localPlayer, localPlayer, sellVehicles[currSelected][1], sellVehicles[currSelected][5], r, g, b, r1, g1, b1) exitShop() end end end)
-
tenho medo de pegarem meu script mais irei mandar a linha pdc ?
-
Ola amigo primeira obrigado pelo o tempo de vocês. Então, eu tenho um script de concessionária em SQL por tecla ele está funcionando normalmente mais quando vo comprar um veiculo(enter) acontece o seguinte erro no Debug script 3: (Client (Victor_Gabriel) triggered serverside event onClientBuyVehicle, but event is not added serverside) além disso o erro faz com que não ocorra nada e só fecha o painel.
-
adicione isso em no final do script addEventHandler ( 'onPlayerQuit', root, function ( ) local acc = getPlayerAccount ( source ) saveAccountDataSono ( acc ) end ) addEventHandler ("onResourceStop",getResourceRootElement( getThisResource()),function() for index,players in ipairs(getElementsByType("player") do local acc = getPlayerAccount ( players ) saveAccountDataSono ( acc ) end
-
alguém pode me ajudar a pelo menos aplicar a função do login no mta ?, tipo eu quero que quando ele clicar em registrar e botar o login senha: quero que bote a login e senha salvo no mta e no mysql, e quando ele clicar em login vai logar na conta do mysql e no mta ao mesmo tempo, no caso não quero que editem o mysql e só aplique a função para mim se quiser mando o prints de como é o paiinel para vocês verem
-
O ruim é não bom em em mysql e tbm n sei mexer com função de login ou register Queri saber se alguem poderia aplicar a função para e tbm o bug do dinheiro
