Jump to content

ANTI CHEAT Script FPS DROP | HELP


scolen

Recommended Posts

---Why does the FPS drop when this anticheat resource is put on the server? What is the reason for that? please help
function generatePass(character)
  local NewPass = ""
  for i = 1, character do
    local PassWordNew = string.char( math.random(97, 122) )
    NewPass = NewPass..PassWordNew
  end
  setElementData(getResourceRootElement(getThisResource()),"0x0x1223#@The1523dwdS252Xoop15asd282Pass@#!", NewPass)
end

generatePass(30)

setTimer(function()
  generatePass(30)
end, 1000, 0)

function getXoopPassword()
  generatePass(30)
  return getElementData(getResourceRootElement(getThisResource()),"0x0x1223#@The1523dwdS252Xoop15asd282Pass@#!")
end 

 

Edited by scolen
Link to comment
  • Moderators
2 hours ago, scolen said:
---Why does the FPS drop when this anticheat resource is put on the server? What is the reason for that? please help

If this code is ran clientside, it will create a lot of lag (because of setElementData).

If ran serverside, it will have impact but consistent. (If the problem is purely located here and not created somewhere else)

For now I consider this code to be ran serverside, because that would be the most logic place for this code to be used.

 

The following components can be considered an impact multiplier on clientside:

 

Does the pass have to be refreshed every 1 second? Can't it be refreshed every 10sec/1 min?

 

 

2 hours ago, scolen said:
 local NewPass = ""
  for i = 1, character do
    local PassWordNew = string.char( math.random(97, 122) )
    NewPass = NewPass..PassWordNew
  end

A small improvement, make the value of NewPass an integer. Which helps with the transfer speed.

 

Link to comment
Just now, IIYAMA said:

Se esse código for executado no lado do cliente, ele criará muito atraso (por causa do setElementData).

Se executado no lado do servidor, terá impacto, mas será consistente. (Se o problema estiver localizado puramente aqui e não for criado em outro lugar)

Por enquanto, considero que esse código será executado no lado do servidor, porque esse seria o lugar mais lógico para ele ser usado.

 

Os seguintes componentes podem ser considerados um multiplicador de impacto no lado do cliente:

 

O passe precisa ser atualizado a cada 1 segundo? Ele não pode ser atualizado a cada 10 segundos/1 minuto?

 

 

Uma pequena melhoria, torne o valor de NewPass um inteiro. O que ajuda na velocidade de transferência.

 

true, also setElementData to store the password can be a resource consuming factor, especially if the generatePass function is called very frequently.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...