Jump to content

DNL291

Moderators
  • Posts

    3,875
  • Joined

  • Days Won

    67

Everything posted by DNL291

  1. https://www.dropbox.com/s/4vcnngoodhfsy6n/antiflood_scmd.zip?dl=0 Esse resource previne spam de comandos do servidor. Também lembre-se de deixar ativado as detecções 14, 31 e 32; outras detecções só recomendo colocar sabendo bem pra quê serve pois terá um peso extra para o servidor. Quanto a pessoa que está fazendo ataques, você pode obter evidências e mostrar a um admin do jogo; se a investigação descobrir algo ilegal vindo do serial dele certamente terá um banimento.
  2. DNL291

    No Disc found

    Please download and run MTADiag and follow the instructions. Post here any Pastebin URL MTADiag gives you
  3. Make sure they are placed in the server resources folder and use refresh command to update new resources while the server is running. Also, please read these documentations if you haven't read yet. https://wiki.multitheftauto.com/wiki/Server_Manual https://wiki.multitheftauto.com/wiki/Resources
  4. Está na categoria errada, use o sub-fórum português aqui: https://forum.multitheftauto.com/forum/97-portuguese-português/ E bem-vindo ao fórum, Quanto à pergunta: Você vai precisar do evento client-side onClientPedDamage fazendo um trigger no server para a função setPlayerWantedLevel. @Kody
  5. Qual servidor ocorre esse problema? (um deles)
  6. Você deixou setCameraMatrix e setCameraTarget juntas, o camera matrix não terá efeito. Fora isso, não vejo os argumentos definidos no seu código.
  7. Evento onPlayerChat, os dois parâmetros são message e messageType. Para detectar o /say você precisa verificar se o messageType é 0, exemplo: addEventHandler("onPlayerChat", root, function (message, messageType) if messageType == 0 then -- /say cancelEvent() -- cancelar a saída padrão local red, green, blue = getPlayerNametagColor(source) -- mostrar o /say modificado outputChatBox(getPlayerName(source)..": #FFFFFF"..message, root, red, green, blue, true ) end end)
  8. DNL291

    No Disc found

    Try reinstalling MTA
  9. Mesma lógica, troca a função de puxar pelo nick por essa de puxar pelo id.
  10. Tente isto: InteriorDP = 6 DimensaoDP = 0 Cmd01 = "a" -- Algema Cmd02 = "d" -- Desalgema Cmd03 = "c" -- Retira Armas Grupo = "Policial" Distancia_Comandos = 7 Deixar_Preso = createMarker ( 1535.73486, -1672.03137, 13.38281 -1, "cylinder", 10, 255, 255, 255, 0 ) Local_Preso = createMarker ( 264.08435, 77.60955, 1001.03906 -1, "cylinder", 2.5, 255, 255, 255, 0 ) setElementInterior ( Local_Preso, InteriorDP ) setElementDimension ( Local_Preso, DimensaoDP ) function emarker ( marker, md ) if md then if marker == Deixar_Preso then if getElementData ( source, "ocupacao" ) == "Policial" then setElementData ( source, "AirNewSCR_PrisaoArea", "Sim" ) exports.Scripts_OnMarkerMsgs_:create ( source, "Aviso: Aperte F9 para Abrir / Fechar o Painel de Prender do DP" ) end end end end addEventHandler ( "onPlayerMarkerHit", getRootElement ( ), emarker ) function lmarker ( marker, md ) if md then if marker == Deixar_Preso then setElementData ( source, "AirNewSCR_PrisaoArea", "Não" ) exports.Scripts_OnMarkerMsgs_:delete(source) end end end addEventHandler ( "onPlayerMarkerLeave", getRootElement ( ), lmarker ) function Algemar_Jogador ( thePlayer, _, nick ) if nick then if getPlayerFromID ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then local player_a_ser_algemado = getPlayerFromID ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_algemado ) local nick_do_policial = getPlayerName ( thePlayer ) local jX, jY, jZ = getElementPosition (player_a_ser_algemado) local pX, pY, pZ = getElementPosition (thePlayer) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if thePlayer == player_a_ser_algemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode algemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_algemado, "algemado" ) or false if Verificar == true then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador ja Esta Algemado!", thePlayer, 255, 255, 255 ) else if dist <= Distancia_Comandos then setElementData(player_a_ser_algemado,"algemado", true ) setElementFrozen( player_a_ser_algemado, true ) toggleControl(player_a_ser_algemado, "fire", false) setPedAnimation( player_a_ser_algemado, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Algemado pelo Policial "..nick_do_policial, player_a_ser_algemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você algemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) else exports.Scripts_Textos:createNewDxMessage ( "Erro: Você esta Muito longe do Jogador! chegue mais Perto para poder Algema-lo!", thePlayer, 255, 255, 255 ) end end end end end end addCommandHandler( Cmd01, Algemar_Jogador) function Desalgemar_Jogador ( thePlayer, _, nick ) if nick then if getPlayerFromID ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo) ) then local player_a_ser_desalgemado = getPlayerFromID ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_desalgemado ) local nick_do_policial = getPlayerName ( thePlayer ) if thePlayer == player_a_ser_desalgemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode desalgemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_desalgemado, "algemado" ) or false if Verificar == false then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador não esta Algemado!", thePlayer, 255, 255, 255 ) else setElementData ( player_a_ser_desalgemado, "algemado", false ) setPedAnimation ( player_a_ser_desalgemado ) setElementFrozen ( player_a_ser_desalgemado, false ) toggleControl ( player_a_ser_desalgemado, "fire", true ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Desalgemado pelo Policial "..nick_do_policial, player_a_ser_desalgemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você desalgemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) end end end end end addCommandHandler( Cmd02, Desalgemar_Jogador) function Retirar_Armas ( source, cmd, pname ) if getElementData(source, "ocupacao" ) == "Policial" then local cliente = getPlayerFromID(pname) if isElement(cliente) then if cliente == source then exports.Scripts_Dxmessages:outputDx(source, "Erro: Você não pode Retirar suas Proprias Armas!", "error") return end local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if dist <= 7 then takeAllWeapons ( cliente ) exports.Scripts_Dxmessages:outputDx(source, "Aviso: Você removeu todas as Armas do Jogador #ffffff"..getPlayerName(cliente).." #ffffffcom Sucesso!", "success") exports.Scripts_Dxmessages:outputDx(cliente, "Aviso: O Policial #ffffff"..getPlayerName(source).."#ffffff Confiscou todas as suas Armas!", "warning") end else exports.Scripts_Dxmessages:outputDx(source, "Erro: O Jogador Não Foi Encontrado!", "error") end end end addCommandHandler ( Cmd03, Retirar_Armas ) function Verificar_Emprego_Atual ( ) for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if acc and not isGuestAccount(acc) then local job = getElementData(player,'ocupacao') local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementData ( player, "ocupacao", "Policial" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Sim" ) setElementData ( player, "AirNew_Perm_Prender", "Sim" ) else setElementData ( player, "ocupacao", "Criminoso" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Não" ) setElementData ( player, "AirNew_Perm_Prender", "Não" ) end end end end setTimer ( Verificar_Emprego_Atual, 1500, 0 ) local Prisao_Blip = createBlip ( 1535.89856, -1672.66479, 13.38281 ) setElementVisibleTo ( Prisao_Blip, root, false ) function Nivel_de_Procurado ( source, int ) if int == 0 then setPlayerWantedLevel ( source, int ) else local wl = getPlayerWantedLevel ( source ) if wl + int <= 6 then setPlayerWantedLevel ( source, wl+int ) else setPlayerWantedLevel ( source, 6 ) end end end addEvent("AirNewSCR_Nivel_de_Procurado", true) addEventHandler("AirNewSCR_Nivel_de_Procurado", getRootElement ( ), Nivel_de_Procurado ) function Mensagens_Exports ( source, msg ) exports.Scripts_Textos:createNewDxMessage ( msg, source, 255, 255, 255 ) end addEvent ( "AirNewSCR_Mensagens_Exports", true) addEventHandler ( "AirNewSCR_Mensagens_Exports", getRootElement ( ), Mensagens_Exports ) function Enviar_Prisao_Servidor ( Jogador, Numero, Formato, Motivo ) outputChatBox ( "#58ACFAPolicia: O Policial #ffffff"..getPlayerName(source).." #58ACFAPrendeu o Jogador #ffffff"..Jogador.."!", root, 255, 255, 255, true ) outputChatBox ( "#58ACFAPolicia: Pelo tempo de "..Numero.." "..Formato..", Motivo: "..Motivo.."!", root, 255, 255, 255, true ) Jogador_Func = getPlayerFromName ( Jogador ) Estrelas_Preso = getPlayerWantedLevel ( Jogador_Func ) givePlayerMoney ( source, Estrelas_Preso*1000 ) if Formato == "Segundo(s)" then Multiplicador = 1 elseif Formato == "Minuto(s)" then Multiplicador = 60 elseif Formato == "Hora(s)" then Multiplicador = 3600 elseif Formato == "Dia(s)" then Multiplicador = 86400 end TempoPrisao = Numero*Multiplicador setElementData ( Jogador_Func, "AirNew_Tempo_Prisao", TempoPrisao ) setElementData ( Jogador_Func, "AirNew_Preso", "Sim" ) setPlayerWantedLevel ( Jogador_Func, 0 ) takeAllWeapons ( Jogador_Func ) setElementData ( Jogador_Func, "Policia:Captura", false ) setElementData ( Jogador_Func, "Player:Msg", "" ) showCursor ( Jogador_Func, false) setControlState ( Jogador_Func, "sprint", false) setControlState ( Jogador_Func, "walk", false) setControlState ( Jogador_Func, "forwards", false) toggleAllControls ( Jogador_Func, true ) triggerClientEvent ( source, "CancelTimeParaPrender:Time", source ) if getElementData ( Jogador_Func, "algemado" ) == true then setElementData ( Jogador_Func, "algemado", false ) setPedAnimation ( Jogador_Func ) setElementFrozen ( Jogador_Func, false ) toggleControl ( Jogador_Func, "fire", true ) end end addEvent( "AirNew_Enviar_Prisao", true ) addEventHandler( "AirNew_Enviar_Prisao", getRootElement(), Enviar_Prisao_Servidor ) function Capturar_Jogador ( source, wantedlevel, vitima ) local x, y, z = getElementPosition ( vitima ) if x < -518 and y < 0 then -- SF time = 4 end if x >= -518 and y < 510 then -- LS time = 2 end if x >= -518 and y >= 510 then -- LV time = 4 end setElementData ( source, "PoliceToPrision:Time", tonumber(time*60) ) setTimer ( triggerClientEvent, 10000, 1, source, "ShowTimeParaPrender:Time", source ) exports.Scripts_Textos:createNewDxMessage ( "Você foi Capturado pelo Policial "..getPlayerName(source), vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Você tem "..time.." Minutos para Levar o Jogador para a Prisão!", source, 255, 255, 255 ) toggleAllControls ( vitima, false ) setElementVisibleTo ( Prisao_Blip, source, true ) end addEvent("AirNewSCR_Capturar_Jogador", true) addEventHandler("AirNewSCR_Capturar_Jogador", getRootElement(), Capturar_Jogador ) function Teleportar_Capturado_Veiculo ( state, player , vehicle , seat ) if state == true then if seat and isElement ( vehicle ) then warpPedIntoVehicle ( player, vehicle, seat ) end else removePedFromVehicle ( player ) end end addEvent ( "AirNewSCR_TeleportarVeiculo", true ) addEventHandler ( "AirNewSCR_TeleportarVeiculo", getRootElement ( ), Teleportar_Capturado_Veiculo ) function Remover_Jogador_Veiculo ( player ) removePedFromVehicle ( player ) end addEvent ( "AirNewSCR_Remover_Jogador_Veiculo", true ) addEventHandler ( "AirNewSCR_Remover_Jogador_Veiculo", getRootElement ( ), Remover_Jogador_Veiculo ) function Teleportar_Capturado_Player ( source, type, value, x, y ,z) local Policial = getElementData ( source, "Policia:Captura" ) if isElement ( Policial ) and not isPedInVehicle ( source ) then if type == "INT" then setElementInterior ( source, value ) elseif type == "DIM" then setElementDimension ( source, value ) end setElementPosition ( source, x, y ,z ) end end addEvent ( "AirNewSCR_TeleportarPlayer", true ) addEventHandler ( "AirNewSCR_TeleportarPlayer", getRootElement ( ), Teleportar_Capturado_Player ) function Liberar_Capturado ( source ) for p, player in ipairs ( getElementsByType ( "player" ) ) do job = getElementData ( player,"ocupacao" ) or "Nenhum" capturado = getElementData ( player, "Policia:Captura" ) if job == "Criminoso" and isElement ( capturado ) then if capturado == source then Soltar_Fail_Captura ( source, player ) end end end end addEvent ( "AirNewSCR_FalharCapturaLiberar", true ) addEventHandler ( "AirNewSCR_FalharCapturaLiberar", getRootElement ( ), Liberar_Capturado ) function Soltar_Fail_Captura ( policial, vitima ) exports.Scripts_Textos:createNewDxMessage ( "O policial falhou e voce está solto novamnte, fuja",vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Voce falhou e o criminoso está solto novamente",policial, 255, 255, 255 ) setElementVisibleTo ( Prisao_Blip, policial, false ) setElementData ( vitima, "Policia:Captura", false ) setElementData ( vitima, "Player:Msg", "" ) showCursor ( vitima, false ) setControlState ( vitima, "sprint", false ) setControlState ( vitima, "walk", false ) setControlState ( vitima, "forwards", false ) toggleAllControls ( vitima, true ) end --- // Salvamento - Carregamento // --- addEventHandler("onPlayerLogin", root, function( _, acc ) CarregarLoginPlay ( acc ) end ) function CarregarLoginPlay ( conta ) if not isGuestAccount ( conta ) then if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getAccountData ( conta, "AirNew_Tempo_Prisao" ) or 0 setElementData ( source, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getAccountData ( conta, "AirNew_Preso" ) or "Não" setElementData ( source, "AirNew_Preso", AirNew_Preso ) end end end function ReiniciarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then CarregarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStart", getRootElement ( ), ReiniciarScript ) -- function SalvarLoginPlay ( conta ) if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getElementData ( source, "AirNew_Tempo_Prisao" ) or 0 setAccountData ( conta, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getElementData ( source, "AirNew_Preso" ) or "Não" setAccountData ( conta, "AirNew_Preso", AirNew_Preso ) end end function DesligarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then SalvarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStop", getRootElement ( ), DesligarScript ) function JogadorQuit ( quitType ) local acc = getPlayerAccount ( source ) if not isGuestAccount ( acc ) then if acc then SalvarLoginPlay ( acc ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), JogadorQuit ) function getPlayerFromID( id ) for _, player in next, getElementsByType("player") do if tonumber(id) and (getElementData(player, "ID") or -1) == tonumber(id) then return player end end return false end Quando for testar deixe o debug ativado /debugscript 3.
  11. Dá acesso negado à sua conta, provavelmente porque não tem permissão na ACL. Vê se sua conta está na acl e se você está logado.
  12. Tá quase, você só mudou o nome da função por getPlayerFromID, você tem que substituir ela inteira por esta: function getPlayerFromID( id ) for _, player in next, getElementsByType("player") do if tonumber(id) and (getElementData(player, "ID") or -1) == tonumber(id) then return player end end return false end Feliz ano novo pra você.
  13. Você precisa colar meu código dentro do script, fora isso é só substituir getPlayerFromPartialName por getPlayerFromID nos três addCommands. Lembre-se de remover a função do código, pois ela não será mais utilizada. Se tiver alguma dificuldade mostre aqui seu código.
  14. function getPlayerFromID( id ) for _, player in next, getElementsByType("player") do if tonumber(id) and (getElementData(player, "ID") or -1) == tonumber(id) then return player end end return false end Tenta usando essa função
  15. dxDrawText("Murders: ",menuCX+3,menuCY+131,screenWidth,screenHeight,tocolor(255,255,255,255),1, "default", "left", "top", false, false, false, true, false) Tenta isso. Se não funcionar pode ser os eixos X/Y com algum problema. Obs: dxDrawRectangle tem screenHeight no 3º e 4º argumento.
  16. É possível mas talvez não da forma que você pensa que vai funcionar. O motivo é que no caso do CJ é facilmente customizável pelo próprio jogo dar suporte aos tipos de roupas e acessórios do personagem, enquanto que nas demais skins isso não é possível. A única alternativa para isso é ter que modificar personagem em um todo e aplicar as texturas (-> shader como já foi dito), Além do conhecimento em shader .fx, é necessário conhecimento em edição de imagem, o trabalho maior vai estar aí se você for criar as roupas você mesmo. O trabalho do shader será basicamente substituir pela nova imagem e aplicar na skin.
  17. Vai depender de como funciona seu sistema de id. A função de retornar o player pelo id é só trocar pela getPlayerFromPartialName.
  18. Seu problema tem a ver com um script, você precisa mostrar seu código aqui e não esperar que outros adivinhem de qual resource se trata.
  19. source naquelas funções estarão como nil por padrão, não terá conflito por não estar em um evento A skin não salva ou não seta no jogador ao logar? Você precisa descobrir onde surge o erro. Na função 'dardados' só consta o setElementData; não vejo setElementModel no carregamento. Um erro que acabei de perceber, setElementData ao comprar a skin está armazenando uma boolean.
  20. You have the steam version of GTA:SA, in this case you will need to downgrade in order to play MTA. Do this if you haven't, and don't modify the original game files, let the downgrader do the work.
  21. Does this happen on other servers? May be a problem with scripts, if it's server specific. Other than that, you can try resetting your game binds.
  22. Don't make these types of posts next time, this is not a place for making mess & spam like your channels. The same warning goes for off-topic contents.
  23. https://community.multitheftauto.com/index.php?p=resources&s=details&id=10435
  24. Verificou se nesse diretório do cache do cliente existe o arquivo xml? Senão tiver vai mostrar essa mensagem de erro. Se o arquivo não estiver sendo salvo no cliente ele não estará no cache, mas sim na pasta do servidor.
  25. Tem certeza que esse código está como client-side? O erro acima ocorre quando não identifica como uma função.
×
×
  • Create New...