Jump to content

daniel0025

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by daniel0025

  1. Eles estão crashando inesperadamente, do nada. Eles estão jogando e do nada aquela bolinha do servidor carrega e eles crasha. Mas acontece em 2 a cada 100 jogadores não é todo mundo. Fiz um diagnóstico pelo MTADiag quem tiver mais conhecimento e ter uma ideia do que está acontecendo eu agradeceria. Link do Diag: https://pastebin.mtasa.com/999995659
  2. Existe algum script para encontrar comandos ocultos do servidor ou de um script especifico? pra ele checar todos os: 'addCommandHandler'
  3. Eu queria incrementar o seguinte if nessa função; if (not getElementData(objects, "eventBox->Use")) or false then Que quando o jogador estivesse com um tal evento em uso, não daria como ele execultar o "Usar" elseif value == "Usar" then useItem(UsarItem[1],UsarItem[2],UsarItem[3],UsarItem[4],UsarItem[5]) Como eu poderia aplicar esse if aí em baixo? elseif state == "down" and button == "left" and confirmando then --if button == 'left' and state == 'up' and showInventory and bodySearch and confirmando then for index, value in ipairs(showmenu) do if isMouseInPosition(posx, posy - index * 40, sx*80, sy*20) then if value == "Cancelar" then UsarItem = {} confirmando = false movedItem = {} elseif value == "Usar" then useItem(UsarItem[1],UsarItem[2],UsarItem[3],UsarItem[4],UsarItem[5]) confirmando = false UsarItem = {} movedItem = {} elseif value == "Mostrar" then local startTime = getTickCount() setElementData(localPlayer, "char >> showedItem", { true, UsarItem[3], getItemName(UsarItem[3]), getItemDescription(UsarItem[3]), getTickCount() }) outputChatBox("Mostrou o item: #F7CA18" .. getElementData(localPlayer, "char >> showedItem")[3], 255, 255, 255, true) triggerServerEvent("bbbMTA->#setPlayer", localPlayer, localPlayer, "MOSTROU (" .. getItemName(UsarItem[3]) .. ")") setTimer(function() setElementData(localPlayer, "char >> showedItem", { false, nil, nil, nil, nil }) end, 5000, 1) UsarItem = {} confirmando = false movedItem = {} end end end
  4. A função funciona o seguinte; quando o jogador sequestra o outro jogador, a vítima vai para o último carro que o sequestrador esteve, porém eu queria colocar que esse carro tenha que estar próximo dele, para a função ser executada pelo mesmo. function sequestrar () local Abordado = getElementData( source,"FeniXMTA_Gang") local cx, cy, cz = getElementPosition ( Abordado ) local px, py, pz = getElementPosition ( source ) local distance = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if ( distance >= 1.8 ) then msgFeniX(source, "Chegue Mais Perto Do Jogador vai efetuar esta função !", "error") elseif ( distance <= 1.7) then if getElementData(Abordado, "amarrado") then local veiculo = carro[source] if carro[source] then attachElements (Abordado, veiculo, 0.2, -1.5, 0, 0,0,90) vrx, vry, vrz = getElementRotation(veiculo) setElementRotation(Abordado, vrx, vry, vrz+83) setElementData(Abordado,"amarrado",nil) setPedAnimation(Abordado) setElementFrozen(Abordado,false) triggerClientEvent("cordaRemove", Abordado) setPedAnimation ( Abordado, "CRACK", "crckdeth3", -1, true, false, true ) setElementData(Abordado, "FeniX:Carro", "Sim") setElementData ( Abordado, "FeniX_GanG", true ) else msgFeniX(source, "Entre no carro e saia para determinar o carro do sequestro! (Depois a execute que o jogador irá para o porta-malas)", "error") end else msgFeniX(source, "Esta função só pode ser executada com o Jogador Amarrado! (Para remove-lo só sair do véiculo)", "error") end end end addEvent ( "FeniX_Sequestrar", true ) addEventHandler ( "FeniX_Sequestrar", root, sequestrar) function sairCarro (vei, assento, vitima) if getElementData( source,"FeniXMTA_Gang") then local Abordado = getElementData( source,"FeniXMTA_Gang") if getElementData ( Abordado, "FeniX:Carro" ) == "Sim" then detachElements (Abordado, getElementAttachedTo(Abordado) ) lx, ly, lz = getElementPosition (Abordado) setElementPosition (Abordado, lx+2 , ly+2 , lz) setElementData(Abordado, "FeniX:Carro", "Nao") setPedAnimation (Abordado, "GRAVEYARD", "mrnM_loop", -1, true, false, true ) setElementFrozen(Abordado, true) setElementData(Abordado,"amarrado",true) triggerClientEvent("cordaAdd", Abordado) removeElementData(Abordado, "FeniX_GanG") end end end addEventHandler ('onPlayerVehicleExit', root, sairCarro)
  5. Poderia copiar e colar já com o output ? com isso empregado? kk Eu não consegui compreender...
  6. Que quando o jogador fosse amarrado aparecesse pro 'abordado' Que ele foi amarrado pelo tal ..getPlayerName(source).. que é o executor da função, no caso o bandido. function amarrarDesamarrar () local Abordado = getElementData( source,"FeniXMTA_Gang") local cx, cy, cz = getElementPosition ( Abordado ) local px, py, pz = getElementPosition ( source ) local distance = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) local dataAmarrado = getElementData(Abordado, "amarrado") if ( distance >= 1.8 ) then msgFeniX(source, "Chegue Mais Perto Do Jogador vai efetuar esta função !", "error") elseif ( distance <= 1.7) then if (not dataAmarrado) then setPedAnimation ( Abordado, "GRAVEYARD", "mrnM_loop", -1, true, false, true ) setElementFrozen(Abordado, true) setElementData(Abordado,"amarrado",true) triggerClientEvent("cordaAdd", Abordado) setElementData ( source, "Amarrar_Desamarrar", true ) else setElementData(Abordado,"amarrado",nil) setPedAnimation(Abordado) setElementFrozen(Abordado,false) triggerClientEvent("cordaRemove", Abordado) setElementData ( source, "Amarrar_Desamarrar", false ) end end end addEvent("FeniX_Amarrar" , true) addEventHandler("FeniX_Amarrar" , root , amarrarDesamarrar) Exemplo: function roubarArmas () local Abordado = getElementData( source,"FeniXMTA_Gang") local cx, cy, cz = getElementPosition ( Abordado ) local px, py, pz = getElementPosition ( source ) local distance = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if ( distance >= 1.8 ) then msgFeniX(source, "Chegue Mais Perto Do Jogador vai efetuar esta função !", "error") elseif ( distance <= 1.7) then removePedClothes ( Abordado ) outputChatBox (""..corMensagem.."BGO INFO "..corMensagem.."✘➺ #ffffffO Bandido "..getPlayerName(source).." #FFFFFFCortou sua comunicação ! Você está impossibilitado de pedir ajuda!", Abordado, 255, 255, 255, true ) outputChatBox (""..corMensagem.."BGO INFO "..corMensagem.."✘➺ #ffffffVocê cortou a comunicação do Cidadão "..getPlayerName(Abordado).." #FFFFFF!", source, 255, 255, 255, true ) end end addEvent ( "FeniX_RoubarArmas", true ) addEventHandler ( "FeniX_RoubarArmas", root, roubarArmas)
  7. DESCONSIDERE! EU CONSEGUI AQUI JÁ! MUITO OBRIGADO, O ERRO ERA UM END QUE EU TINHA COLOCADO ERRADO
  8. Troquei, agora aparece um seguinte erro ao dar start no script: Loading script failed .lua256: 'end' expected (to close 'function' at line 24) near '<eof>' linha 24 é a função: function ClickJogdor ( Player ) e a linha 256 é lá... no final do script em si end
  9. Eu queria mudar essa linha 3° Que está do lado do server, que invés dele reconhecer que o jogador está na acl reconhecer que ele está em serviço de gang, com um exports. function ClickJogdor ( Player ) local acc = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..acc, aclGetGroup ( Grupo ) ) then <<<<<<<<<<<< local account = getPlayerAccount (Player) if isGuestAccount (account) then msgFeniX(source, "Esse Jogador está deslogado !", "error") return end local cx, cy, cz = getElementPosition ( Player ) local px, py, pz = getElementPosition ( source ) local distance = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) if ( distance <= 1.7 ) then if Player == source then return end triggerClientEvent (source , "FeniX_AbrirGang" , source) setElementData(source, "FeniXMTA_Gang" , Player) end end end addEvent ( "FeniX_Jogador", true ) addEventHandler ( "FeniX_Jogador", root, ClickJogdor) (--Lado do server)) Substituir a linha 3 para: if exports.ada_admin:isPlayerFaccao(localPlayer) or getElementData(localPlayer,"acc:id") == 1 and element ~= localPlayer then Más pelo oque eu vi precisa-se está do lado do client e eu não sei como eu coloco isso do lado do client... No client tem as seguinte função, como eu poderia mover 'acoplar' essa função do lado do client juntamente com esse if, substituindo a linha 3°: if isObjectInACLGroup ("user."..acc, aclGetGroup ( Grupo ) ) then function abrirDx () if not isEventHandlerAdded("onClientRender", getRootElement(), dxGang) then addEventHandler("onClientRender" , root , dxGang) else removeEventHandler ("onClientRender" , root, dxGang) end end addEvent ("FeniX_AbrirGang", true) addEventHandler ("FeniX_AbrirGang", getRootElement(), abrirDx) (--Lado do client)
  10. Era problema na função 'sqlConnection' Que estava somente Connection
  11. Sim, sim, eu tinha arrumado o erro, era bem esse mesmo, kk
  12. Quando eu abro o inventário do veiculo aparece o erro... de Bad Argument SetElementData
  13. function checkVehicleInfo(element) itemTable = {} --mouse = true triggerEvent("progressService", localPlayer, 1, "#ffffffCarregando inventário") antibug = setTimer(function() if not showInventory then showInventory = true end --mouse = false setElementData(source, 'playerInUse', true) --O Erro está aqui! segundo o debugscript activeInvState = 'bag' removeEventHandler("onClientRender", root, drawInventory) addEventHandler("onClientRender", root, drawInventory) end,1000,1) triggerServerEvent('btcMTA->#getElementItem', localPlayer, element) openInventory(element) setElementData(source, 'char >> element', element) end addEvent("btcMTA->#checkVehicleInfo", true) addEventHandler("btcMTA->#checkVehicleInfo", getRootElement(), checkVehicleInfo) A função é o seguinte; Quando o player está com o inventário do veículo aberto ele é impossibilitado de receber qualquer item, porém está dando bad argument 'SetElementData'
  14. Lord poderia me ajudar num script ?

     

  15. AVISO: nog_interior \ sourceS.lua: 58 argumento incorreto "dBpool" AVISO: nog_interior \ sourceS.lua: 21 argumento incorreto "dBQuery" linha 58: local Query = dbPoll (dbQuery (connection, "SELECT * FROM interiors WHERE id =?", id), - 1) linha 21: consulta local = dbQuery (conexão, "INSERT INTO interiors SET x =?, y =?, z =?, interiorx =?, interiory =?, interiorz =?, nome =?, tipo =?, custo =? , interior =?, interiorwithin =?, dimensionwithin =?, customint =?, owner =? ", x, y, z, ix, iy, iz, name, inttype, cost, interiorid, marker_int, marker_dim, 0, 0) Eles normalmente estão conectados ao banco de dados, mas consiste em dar esse erro. Alguem sabe por quê? e as mesas estão boas
×
×
  • Create New...