17.11.2010, 23:12
Thats really a cool story and all bro.
But what you just explained is common sense.
But what you just explained is common sense.
I have a question:
If a player has 200 armour. he gets shot, and looses 10 armour -> Package gets sent he gets shot again, and looses 10 armour -> Package gets sent The server receives the packages in a wrong order, and is told that the player's armour changes from 100 to 80 and to 90 Now the quesrion is: If the player now doesn't loose or get armour for the next 1 minute. will the server then think one minute long that the player's armour is 90? or will the client (player) also send new updates while his doesn't change? |
The server runs on a single thread The server runs on a single thread. This might sound complicated for some people, allow me to explain: All the actions the server does are always after waiting for the latest action to finish. For example, if you have code that takes 3 seconds to run in OnPlayerConnect (such as the old GeoIP plugin), then the server will wait for that code to finish before doing anything else. |
1 - gtasa ingame action(position, aimming, shooting, etc) 2 - sa-mp info(scores, text, dialog, etc) 3 - plugin data
The client is currently paused so the message is put in a pool and will be handled once the player is unpaused and all the messages in the pool before it was handled. |
db_query( db, "PRAGMA synchronous = 0" );
Firstly, I totally agree on that your description of player sync, it makes my mind clear.
Which ought to be arguments is just the topic "The server runs on a single thread", and text,dialog,etc sync. And unfortunetally, this bug reoprot shows that the server doesn't run on single thread, probably. So I hope you could change the topic "The server runs on a single thread" to "The script runs on a single thread", as you said, which I also do think so. |
This helped me to understand why innocent players get auto-banned on my server.
But how do i detect the packet loss of a player and automatically kick them for, let's say a certain amount of packet loss percentage? |