netstats_ functions doesn't work in OnPlayerDisconnect.
#10

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
Isn't this normal behaviour?
After all, the client has already closed the connection to the server, and the server probably checks this and calls OnPlayerDisconnect.
The client cannot respond to server-calls anymore, so getting player-data is nearly impossible and unreliable.
Actually the data for the player's network stats is probably (it'd make the most sense) stored on the server, not requested from the client.

This is the case for most (if not all) things in SA-MP, for example if a player has 100 health and you run this code:

pawn Код:
SetPlayerHealth(playerid, 69);
new Float:health;
GetPlayerHealth(playerid, health);
printf("Health: %f", health);
You'd find that it prints out '100', not the '69' you'd expect. This is because the player's health is stored on the server, and won't be updated until the player syncs with the server (when OnPlayerUpdate is called).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)