Jump to content
  • 0

Disconnect the cable in mini missions


COROLLA

Question

3 answers to this question

Recommended Posts

  • 0
some players for some reasons disconnect the cable and connect it back without getting (timed-out)

'timed out' means server and client were not able to communicate for a specified time (such as 10 seconds). If they reconnect the cable before exceeding the time-out time, everything will be okay.

and they can move to another place on the map without getting damaged (cheating)

Could you please explain this a bit more precisely?

Link to comment
  • 0

You said: 'timed out' means server and client were not able to communicate for a specified time (such as 10 seconds). If they reconnect the cable before exceeding the time-out time, everything will be okay.

That's true, I meant in these 10 seconds, the player who want to cheat can move around and reconnect the cable, that's kind of cheat.

So, how can i avoid it? I want anyone who do this get timed out directly.

Link to comment
  • 0

There's a way to avoid it, and it means you would need to use 'getPlayerPing'.

Basically you would need to set a timer that's always running to check if every player's ping is not 0 and if it is then basically kick them.

Example:

setTimer(function() 
    for _,p in ipairs(getElementsByType('player'))do 
        local ping = getPlayerPing(p) 
        if ping == 0 then 
            kickPlayer(p,'Disconnected from server!') 
        end 
    end 
end,1000,0) 

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...