Jump to content

AlfaMTA

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by AlfaMTA

  1. Thx for the two who tried to help me! Now, my problem is in this line: local theVehicle = getPedOccupiedVehicle(hitElement) I'm already 2 hours trying to fix it but I don't have success! >;( >ERRO Bad argument @ 'getPedOccupiedVehicle'
  2. Hi guys I need to start this event addEventHandler("onMarkerHit",marker,...) Only, when the player is getVehicleEngineState = false and vehicle is getElementVelocity = 0 ie parked! I tried to do it addEventHandler("onMarkerHit",marker,function(player) if getElementVelocity(player) == 0 and getVehicleEngineState(getPedOccupiedVehicle(player)) == false then --code... end end) But, the event only executed one time and I dont have time to turn off the engine and neither park the car.. I need to update it constaly to check if the player is parked the car or not... I already tried to use timers and killTimer, but I couldn't stop it and generated a infinite loop! Thanks for all
  3. Jusonex , I meant to check if the player is aiming and force to aim like a sniper, rocket launcher and others that you should aim before you shoot!
  4. Hi everyone I would know how to force the player to aim to fire , like a sniper! Thanks everyone!
  5. Sorry everyone!! Actually It's works, I did a mess with name of script and I forgot to save the script Thanks for all!!
  6. Unfortunaly, it doesn't work for me!
  7. I'm trying to do a tazer system with silenced pistol then, I put it in serverside: function removeDamage () setWeaponProperty (23, "poor", "damage", 0) end addEventHandler ( "onResourceStart", resourceRoot, removeDamage ) But it doesn't work can anyone help me?? Thanks for all!
  8. My question were "How can I do return values through triggerEventServer or triggerEventClient to communicate serverside and clientside???" but your suggestion is a good way to resolve my problem Nice solution, I'm going to test it! Thank you!
  9. Hi guys! Again I here to ask your help Well, I trying to do a function in my gamemode to check if a player is VIP or not... To call this function I use triggerServerEvent triggerServerEvent("checkIfPlayerIsVIP", localPlayer) And I'm using the triggerServerEvent inside a if, see: if (triggerServerEvent("checkIfPlayerIsVIP", localPlayer)) == true then In the gamemode I put it: addEvent( "checkIsVIP", true ) addEventHandler( "checkIsVIP", root, function () local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user.".. accName, aclGetGroup("VIP")) then return true else return false end end) So I would want that the function in gamemode return a boolean value to use on my if to check if player is VIP or not I hope you understood my situation! Thanks for all!
  10. Nossa brigadão mesmo! Só tenho uma duvida id = #allLo+ 1 Esse # faz oque?? Valeu pela força!
  11. Hello everyone! Today, I would ask you about my problem Well, can anyone help me? I need to get a ACL group of the player, how can I do it?? which function should I use? Actually I'm trying to do a command for admin and vip acl group! Thank for all answers!
  12. E tipo se eu usar o SQL eu tenho que ter 2 servidores rodando então?? Tipo o do MTA e o do Base de dados? Ou tem como por tudo no MTA ?? Obrigadão
  13. Muito interessante, ajudou bastante e já fiz vários testes com essa função! Gostaria também se tem como eu buscar os valores via getAccountData quando o jogar estiver "Offline" e gostaria de pedir uma mãozinha Eu estou querendo criar um sistema de gang e queria saber se é possível usar o getAccountData e o setAccountData para fazer esse sistema ou se eu preciso usar XML para salvar a lista das gangs e no caso do XML , se puder, me recomendar algum tutorial ou tópico que me possa ajudar a entender como trabalhar com o XML no lua do MTA Fico muito! Mas muito grato a você! Valeu
  14. Olá a todos! Gostaria que me ajudassem a usar o setAccountData e getAccountData string getAccountData ( account theAccount, string key ) setAccountData ( account theAccount, string key, string value ) O string key é oque? Para que serve? Tenho que criar? Como eu criou? Podem me dar uns exemplos para ajudar a entender melhor ??? Agradeço mais uma vez a todos!
  15. Pocha muito obrigado mesmo!! Isso me ajudou a esclarecer muita coisa... Espero que este topico possa ajudar também ao pessoal de fora. Até mais!!
  16. Ola mais uma vez Bom, venho mais uma vez pedir a ajuda de vocês para entender umas diferenças Alguém me poderia esclarecer qual a diferença entre um script server de um client ?? Eu penso que nos casos as alterações são feitas a níveis de servidor e de jogador como por exemplo a função moveObject que server para clientside e serverside ... Eu acho que se for colocada em um script client, o determinado objeto só se moveria para o jogador que acionou a função e se fosse colocado em um script server ele moveria o objeto a nivel do servidor inteiro ou seja para todos os jogadores... Estou certo????? Antes de mais obrigado a todos que me tentarão esclarecer essa duvida que acho fundamental...
  17. Eu posso ate dizer para oque eu queria isso.. Era para criar um menu de seleção de spawn, e já consegui ONIX1337 Muito obrigado por tentar me ajudar! Mas era ao contrario Thank for answer me WhoAmI , it was exactly which I wanted! See ya!
  18. Vai ter equipe de segurança do servidor? Pen test?
  19. Bem, estou inciando em Lua para MTA faz 3 dias, e gostaria de saber como faço para acessar uma função do Serverside atravez do Clientside, vou dar um exemplo: Imaginado uma situação que eu quero fazer uma função para dar spawn e pretendo acessar ela atravez do Clientside Server function SpawnNow(x, y, z) spawnPlayer(source, x, y, z) fadeCamera (source, true) setCameraTarget (source, source) fadeCamera(player, true) showChat(player, true) end Client (Como eu chamo ela no client?) SpawnNow(1959.55, -1714.46, 10) --Seria assim? Obrigadão!
×
×
  • Create New...