Jump to content

joaokennedy

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by joaokennedy

  1. I need to move an object in a sequence of points, so that it always has the correct rotation according to the next point. I tried to use findRotation but when I use the moveObject function ( element, x, arg, y, z, rotx, rotz, NewRotation ) the object simply starts to rotate, 360 degrees from one point to the other. I need to get it to smoothly rotate the rotation to face the next point.
  2. Can anybody help me? local Values = {["OB1"] = 8, ["OB2"] = 1, ["OB3"] = 10, ["OB4"] = 6} I've tried it in all the ways I know and so far it has not worked. I need this table to be organized by the values from highest to lowest, for example: local Values = { ["OB3"] = 10, ["OB1"] = 8, ["OB4"] = 6} ["OB2"] = 1, I have tried to use (table.sort) but I could not do the ranking from highest to lowest value. Could someone help me with this? I also need a loop of the table where the first 3 values appear in the chat.
  3. It would be very useful to use the: (setWeaponProperty "maximum_clip_ammo") client mode as I am working with new weapons with different ammunition quantities. When the server determines it changes for everyone and this is bad! Please add this function will be very useful!
  4. The names of the servers that buy positions should be colored to make a difference! Please colorize the names will be much more attractive!
  5. The names of the servers that buy positions should be colored to make a difference! Please colorize the names will be much more attractive!
  6. Olá, Gostaria de uma ajuda, tendo em vista a grande números de ataques ao meu servidor estou tentando criar uma proteção através de regras de firewall que possa minimizar o dano causado pelo ataque na sincronização do meu servidor. Tentei pesquisar na própria wiki do MTA em busca de artigos relacionados a conexão do client x server a unica coisa que consegui localizar é o comando "shownetstats" que através dele consigo observar informações relacionadas a rede aparentemente é mostrado que com mais de 100 players usa aproximadamente 40kbps de download e até 5kbps de upload do client, estou com medo de determinar o envio máximo de 5kbps e ter problemas, alguém consegue me responder se essa informação procede? Pois penso que se limitar para o servidor receber no maximo 10kbps de ips e dropar o que ultrapasssar irá sentir menos os ataques.
  7. Com qual função eu conseguiria comparar Ex: O Valor lido no arquivo if ValorLidoNoArquivo > 1 then end como eu usaria esse valor para comparar pois está dando um ERRO "attempt to compare number with string"
  8. Hello I have some doubts related to FileFunctions: Local file if fileExists ("Arquivo.lua") then file = fileOpen ("Arquivo.lua") else file = fileCreate ("Arquivo.lua") end How do I every time some type an ex command: Saves the number 01, and retype replaces the 01 by 02 and so will always replacing the previous number by itself + 1 and then how do I save the file, tried read the Wiki but the translation I am very confusing to me. Thank you very much! Translate Google Tradutor
  9. Olá Estou com algumas duvidas relacionados ao FileFunctions: local file if fileExists("Arquivo.lua") then file = fileOpen("Arquivo.lua") else file = fileCreate("Arquivo.lua") end Como que faço para toda vez que algum digitar um comando ex: Salva o numero 01, e se digitar novamente substitui o 01 por 02 e assim vai sempre substituindo o numero anterior por ele mesmo + 1 e depois como faço para salvar o arquivo, tentei ler o Wiki mas a tradução fico muito confusa para mim. Muito obrigado!
  10. Hello, I would like someone that has a little advanced knowledge with Scripts give me a coherent response. Some time ago monitorei a 'Gamemode Zombie "on my computer and a virtual machine, so when I realized the Gamemode start is by using 0.3% of the CPU and 20% of R.AM Memory, and this amount increases according to the Players , leaving the Gamemode online for a few days, I was testing the scripts and realized that won a few milliseconds more to run and even without players on the server uses 67% of Memory RAM while the CPU is around 52%. I wonder, what does the processing Gamemode be no one on the server, I thought of repetitive SetTimer but do not know if this is just the cause. I like the opnion of you ... What is the reason for this use high even without online players on the server and because this waste of time to run scripts? Now, thank you all. I used Google Translate.
  11. Hello, I would like someone that has a little advanced knowledge with Scripts give me a coherent response. Some time ago monitorei a 'Gamemode Zombie "on my computer and a virtual machine, so when I realized the Gamemode start is by using 0.3% of the CPU and 20% of R.AM Memory, and this amount increases according to the Players , leaving the Gamemode online for a few days, I was testing the scripts and realized that won a few milliseconds more to run and even without players on the server uses 67% of Memory RAM while the CPU is around 52%. I wonder, what does the processing Gamemode be no one on the server, I thought of repetitive SetTimer but do not know if this is just the cause. I like the opnion of you ... What is the reason for this use high even without online players on the server and because this waste of time to run scripts? Now, thank you all. I used Google Translate.
  12. Olá, Gostaria que alguém que tem conhecimento um pouco avançado com Scripts me desse uma resposta coerente. Há algum tempo monitorei um "Gamemode de Zumbi" no meu Computador e em uma Máquina Virtual, pelo que percebi quando o Gamemode inicia fica usando 0.3% do CPU e 20% da Memoria R.AM, e essa quantidade aumenta de acordo com os Players, deixando o Gamemode ligado por alguns dias, fui testar os Scripts e percebi que ganharam alguns milissegundos a mais para serem executados e mesmo sem players no servidor utiliza 67% de Memoria R.A.M enquanto o CPU gira em torno dos 52%. Eu gostaria de saber, o que faz o Gamemode ficar processando sem ninguém no server, eu pensei em SetTimer repetitivos porém não sei se é apenas isso o causador. Eu gostaria da opnião de vocês... Qual será o motivo desta utilização elevada mesmo sem players online no servidor e porque essa perda de tempo ao executar scripts? Desde já, agradeço a todos.
  13. Nossa muito obrigado, por acaso você mecher com a função onSettingChange?
  14. Alguem pode me dizer o que está errado? function Teste (Element) -- Teste end addEventHandler ( "onColShapeHit", ColCuboid, Teste) function RemoverEvent(source) RemoveEventHandler ( "onColShapeHit", ColCuboid, Teste) end addCommandHandler ( "removeevent", RemoverEvent) Erro: [Teste]\TesteScript.lua:07: attempt to call global 'RemoveEventHandler' (a nil value) E ai vem a pergunta o que está de errado?
×
×
  • Create New...