Jump to content

Doongogar

Members
  • Posts

    329
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Doongogar

  1. utilize a função 'code' para colocar um código no seu post, a função está localizada logo acima juntamente as outras ferramentas. Se você quer remover todas as armas que o jogador possui, você pode usar a função takeAllWeapons, porém se deseja retirar somente armas especificas, pode usar a função takeWeapon, a primeira retira todas as armas sem que o jogador possui, já a segunda você pode escolher qual arma você quer que a função retire, lembrando que ambas são rodadas somente no lado servidor
  2. Há um tempo atrás vi uns projetos de umas pessoas que supostamente eles fizeram um anti-spoofer fazendo com que quem tentasse entrar no servidor utilizando spoofer(remoção de banimento) não conseguisse, gostaria de saber se isso é possível mesmo de ser criado e como fazer um, pois também quero essa proteção.
  3. Obrigado pela dica, realmente tinha um mod que tava crashando e eu não sei o motivo, porém já vou o substitui-lo. Eu já havia checado os mods antes porém agora eu chequei com mais cuidado e já deu tudo certo muito obrigado.
  4. Isso acontece, pois o script está verificando se o player está em um grupo de ACL que não existe no seu servidor, pois você não a criou, verifique qual é o nome do grupo de ACL, o crie e então se adicione nele para usar a fábrica. Quando você for adicionar um script ao seu post utilize o formato 'code' encontrado acima na caixa de texto juntamente a outras ferramentas, é um símbolo de duas setas apontando a lados opostos: <>
  5. Quando eu ligo os mods do servidor local, eu crasho após eles carregarem, aparentemente a maioria dos mods liga sem problemas, mas em questão de 10 segundos depois eu crasho e o jogo fecha por completo exibindo essa mensagem. Eu ligo os mods todos ao mesmo tempo com o 'AutoStart' sei que por estar iniciando varios mods ao mesmo tempo poderia mesmo crashar, porém quando eu entro novamente no servidor eu crasho no painel de login, antes os mods estavam funcionando tranquilamente, lembro-me de ter apagado alguns mods do jogo e cometi o erro de apagar mods que eu não deveria ter apagado do próprio mta, porém mesmo recolocando os mods do mta o erro permanece. Quando ligo manualmente os mods funciona normalmente, até tentei ligar metade dos mods manualmente e o resto utilizar o 'AutoStart' porém mesmo assim crasha. Alguém poderia me ajudar? OBS: consigo entrar em outros servidores sem problemas.
  6. Eu queria saber se tem algum site original do mta que eu possa baixar os mods originais para repor no servidor, pastas como [admin] e [gameplay] e etc para quando uma der erro eu trocar sempre da fonte confiável.
  7. Para aparecer uma mensagem quando um player entra em um marker você precisar manipular o evento onMarkerHit e exibir a função outputChatBox Exemplo: Marker = createMarker(0, 0, 0, "cylinder", 2, 255, 0, 0) -- cria o marker function Aviso(player) if getElementType(player) == "player" then -- caso o tipo do elemento que hitou o marker seja "player" então... outputChatBox("Você entrou no marker", player, 255, 255, 255, true) -- exibe a mensagem para o player end end addEventHandler("onMarkerHit", Marker, Aviso) -- adiciona a função no marker "Marker" Já sobre a segunda questão, eu não entendi bem, porém darei um exemplo de código que ao player entrar no marker será criado um veiculo e automaticamente o player será colocado dentro do veiculo criado: Marker = createMarker(0, 0, 0, "cylinder", 2, 255, 0, 0) -- cria o marker function Veiculo(player) if getElementType(player) == "player" then -- caso o tipo do elemento que hitou o marker seja "player" então... local veh = createVehicle(411, 1, 1, 1) -- cria o veiculo warpPedIntoVehicle(player, veh) -- coloca o player dentro do veiculo, como não coloquei o assento especifico ele irá para o piloto end end addEventHandler("onMarkerHit", Marker, Veiculo) -- adiciona a função no marker "Marker" Ambos são o mesmo principio com alguma modificações. Nesse exemplo utilizei as funções warpPedIntoVehicle e createVehicle além das que eu já usei anteriormente
  8. I didn't understand well, but for a login panel to work it needs to be in the admin acl as it needs administrative permissions to create and register accounts press P/resources/open admin group/type "resources.(resource name)"
  9. Doongogar

    Help Car

    here's a simple example, I don't recommend using it the way it is, and just so you understand the logic function engineOffByCrash() local thePlayer = getVehicleOccupant(source) -- 'source' is the vehicle in event 'onVehicleDamage' if thePlayer then -- Check there is a player in the vehicle local vehealth = getElementHealth(source) -- Get the vehicle's health if vhealth <= 320 then -- Checks whether the vehicle's health is equal to or less than 320 setVehicleEngineState(source, false) -- Turn off the vehicle end end end addEventHandler("onVehicleDamage", root, engineOffByCrash)
  10. you can use getElementSpeed or getElementVelocity
  11. WeaponIDs = { [36] = true, -- ID da bazuca por teleguiado [35] = true, -- ID da bazuca comun [38] = true, -- ID da minigum } function banPorArma(previous, next) if (WeaponIDs[next]) then -- verifica se a arma contém o ID na lista banPlayer(source) -- source é o player no evento onPlayerWeaponSwitch end end addEventHandler("onPlayerWeaponSwtich", root, banPorArma) Esse código é acionado quando um player troca de arma com o evento onPlayerWeaponSwitch e detecta se a arma 'seguinte' contém o ID na tabela weaponIDs, caso sim, o player é banido. Você pode adicionar mais pârametros na função banPlayer, só pesquisar na wiki os pârametros disponiveis. Lembrando que para usar a função banPlayer o resource precisar ter permissões Admin. Você pode adicionar mais IDs de armas, na página weapons tem todos os IDs de todas as armas do MTA.
  12. you could use the onElementDestroy event to check if the destroyed element is a car and if it has an owner, if so, run the event to save the vehicle that probably already has it in the dealership mod
  13. you could create a marker, or a col shape and add the event onMarkerLeave or onColShapeLeave and set the position of the ped with setElementPosition to where it was
  14. I don't know if you modified the files, but if you have, I suggest you reinstall the files because it doesn't exist in the original meta and neither does the 'Burgersdot' folder
  15. Wrap EVERYTHING files in a folder, the name of this folder will be the name of the resource. text translated by google translator, sorry if something is wrong
  16. Doongogar

    TDMA

    you can use this functions: onMarkerHit setTimer setElementDimension
  17. i recommend this: function MessageByCommand(thePlayer) outputChatBox("#F4E607[VIP] #FFFFFF/vskin 1, /vskin 2, /vskin 3, /vskin 4", thePlayer, 244, 230, 7, true) end addCommandHandler("vskins", MessageByCommand) because when you use the onClientPlayerCommand or the onPlayerCommand the script detects all the commands and even messages in the chat and to filter them out if they are "vskins" this is not very optimized, even if the amount of optimization doesn't change the code that much it makes more sense to me since it doesn't detect each command and message and filters them, but if the player executes the command "vskins" it sends a message in the chat Note: I think there is no onClientPlayerCommand event, only onPlayerCommand, I just didn't find it on the wiki, but I'm not sure
  18. for this you can use the onPlayerDamage event checking if the cause of the damage is a weapon, and then filter just for the player to run an animation to be sure of firearms, and then have the source(source of the event) execute the desired animation and remember to write in english outside any language forum specified
  19. eu não entendi muito bem, teria como explicar sem valores ou números e sim com situações do próprio mta?
  20. you can get the pilot with getVehicleOccupant function and check if it exists an example that maybe can help you function VehicleHealth(attacker, weapon, loss) local HealthOfVehicle = getElementHealth(source) local driver = getVehicleOccupant(source) if driver then outputChatBox("life before the crash: "..math.floor(HealthOfVehicle)) outputChatBox("life after the crash: "..math.floor(HealthOfVehicle - loss)) outputChatBox("damage taken: "..math.floor(loss)) end end addEventHandler("onClientVehicleDamage", root, VehicleHealth)
  21. onPedWasted or onClientPedWasted
  22. onVehicleDamage getElementHealth
  23. eu queria saber qual a diferença de uma linha com ou sem parenteses, geralmente eu uso sem por não saber como usar ou para que usar darei exemplos: addEventHandler("onPlayerVehicleEnter", root, function(veh, seat) if getElementModel(veh) == 540 then -- sem parenteses print("oi") end end) addEventHandler("onPlayerVehicleEnter", root, function(veh, seat) if (getElementModel(veh) == 540) then -- com parenteses print("oi") end end)
  24. se é um código no server não se usa localPlayer, as aspas do outputChatBox estão erradas tente assim: function versujis(player) local Dinheiro__Sujo = getElementData(player, "TS:sujo") or 0 outputChatBox("[info] R$"..Dinheiro__Sujo, player, 255, 255, 255, true) end addCommandHandler("versujo", versujis)
×
×
  • Create New...