Convoy Trucking

Server related => Suggestions => Locked & Closed Suggestions => Topic started by: Dobby on July 31, 2013, 17:13

Title: Players to see own packetloss
Post by: Dobby on July 31, 2013, 17:13
I've got a suggestion for nobody understandind sync on sa-mp.

If there's no admins online, and a player is wondering why they cant see buildings loading on mapped islands etc, or why they're lagging, it usually means they're desynced. How about the player can check their packetloss?

They can't see anything related to the server that could damage anything. They just see their own stats. Packetloss being the good one to see.

OLD
[spoiler]
(http://i.imgur.com/VslhphB.jpg)
[/spoiler]
The image above. Shows what you'll see.
[spoiler]

COMMAND:mynetstats(playerid,params[])
{
new netstats[401];
    GetPlayerNetworkStats(playerid, netstats, sizeof(netstats));
    ShowPlayerDialog(playerid,DIALOG_ID_HERE, DIALOG_STYLE_MSGBOX, "Your Network Stats:", netstats, "Okay", "");
return 1;
}

[/spoiler]

I've even been nice enough to script it. So all Mick has to do, is add a dialog ID to it :) that's if its agree'd to.

I've also (as noticed by iRedDawn) added the max packetloss acceptance to it:

NEW
[spoiler]
(http://i.imgur.com/NyElxZh.jpg)
[/spoiler]

The code:
[spoiler]

COMMAND:mynetstats(playerid,params[])
{
new netstats[401],string[564];
    GetPlayerNetworkStats(playerid, netstats, sizeof(netstats));
    format(string,sizeof(string),"{FF3C00}If you have a packetloss of 2.0+ we suggest a relog\n{FFFF00}%s",netstats);
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Your Network Stats:",string, "Okay", "");
return 1;
}

[/spoiler]

iRedDawns:
Code:
[spoiler]

CMD:packetloss(playerid, params[])
{
#pragma unused params
new netstats[401], find;
GetPlayerNetworkStats(playerid, netstats, sizeof(netstats));
find = strfind(netstats, "Packetloss:"); find += 12;
strdel(netstats, 0, find);
find = strfind(netstats, "%");
strdel(netstats, find, sizeof(netstats));
new Float:packetloss = floatstr(netstats);
new temp[5];
format(temp, sizeof(temp), netstats);
if(floatcmp(packetloss, 2.0) == 1)
{
    format(netstats, sizeof(netstats), "Your packetloss is {FF0000}%s%s{FFFFFF}, you have to relog.", temp, "%%");
}
else
{
    format(netstats, sizeof(netstats), "Your packetloss is {00FF00}%s%s{FFFFFF}, it's fine.", temp, "%%");
}
SendClientMessage(playerid, -1, netstats);
return 1;
}

[/spoiler]
Title: Re: Players to see own packetloss
Post by: DJ_Smashon on July 31, 2013, 17:17
Press & Hold F5?
Title: Re: Players to see own packetloss
Post by: Matias on July 31, 2013, 17:20
Quote from: DJ_Smashon on July 31, 2013, 17:17
Press & Hold F5?

Thats ingame packetloss, /network command tells you hows your packetloss related to the server, the ammount of packets being lost within you and the server.
Title: Re: Players to see own packetloss
Post by: Dobby on July 31, 2013, 17:23
Quote from: Matias. on July 31, 2013, 17:20
Quote from: DJ_Smashon on July 31, 2013, 17:17
Press & Hold F5?

Thats ingame packetloss, /network command tells you hows your packetloss related to the server, the ammount of packets being lost within you and the server.

This.

Admins have it with a "targetid" parameter. So they can do something like "/network DobbysGamertag." to get my packetloss to the server.
Title: Re: Players to see own packetloss
Post by: Matias on July 31, 2013, 17:24
Anyways theres no need of a /network command...
Mick scripted some months ago a command to check your packetloss and it will be announced to you with a message at chat. Actually that command is telling us our packetloss, the best one and the worst one of all the server. Maybe it should be edited to only tell your packetloss.
Anyways this is pretty useless because almost no one understands this kind of networks things, only a few people knows what it means.
Title: Re: Players to see own packetloss
Post by: Dobby on July 31, 2013, 17:37
Quote from: Matias. on July 31, 2013, 17:24
Anyways theres no need of a /network command...
Mick scripted some months ago a command to check your packetloss and it will be announced to you with a message at chat. Actually that command is telling us our packetloss, the best one and the worst one of all the server. Maybe it should be edited to only tell your packetloss.
Anyways this is pretty useless because almost no one understands this kind of networks things, only a few people knows what it means.

But they can learn can't they? sa-mp is notorious for sync issues. There's hundreds of MTA vs SA-MP videos, discussions all over the web. If someone says in chat:


Newb: Why hasn't the road appeared @ Fir Island, Wet County.
BX95: You're probably desynced. Check /netstats and look for packetloss.
Newb: What's packetloss?.
BX95: It means how many "packets" of data are lost between you and the server, Thus, not loading things properly.
Newb: Ok ty. I have 2.1%. Is that bad?
BX95: You should relog. The anti cheat hates packetloss.
Newb(25) has left the server. (Exit)


Get what i mean? :) people can learn what packetloss/sync in samp by asking in game, or checking the topic Lindsey made about it. this command i'm suggesting is for when no admins are online.
Title: Re: Players to see own packetloss
Post by: Bruno_2MLG4CT on July 31, 2013, 18:26
Not sure if only moderators has that cmd, I'll try later and reply again.
Title: Re: Players to see own packetloss
Post by: Terrorista310 on July 31, 2013, 19:22
1
Title: Re: Players to see own packetloss
Post by: Supreme on July 31, 2013, 19:24
1
Title: Re: Players to see own packetloss
Post by: Twido on July 31, 2013, 19:26
f5 is the real stats. And if you get desynced you can see it through F5.
Title: Re: Players to see own packetloss
Post by: Hobo on July 31, 2013, 22:38
Quote from: Twido on July 31, 2013, 19:26
f5 is the real stats. And if you get desynced you can see it through F5.
Lolno. F5 is client side and has nothing to do with packetloss between you and the server. F5 almost always says 0.0% packetloss where as if you checked with /network you almost always have at least 0.1% packetloss.

+1 to the suggestion.
Title: Re: Players to see own packetloss
Post by: Bruno_2MLG4CT on July 31, 2013, 22:47
1
Title: Re: Players to see own packetloss
Post by: Jori_Mart on August 01, 2013, 16:00
Im universal :) so +941224524201214751121541561412455
Title: Re: Players to see own packetloss
Post by: Dobby on August 03, 2013, 15:22
Quote from: Jori_Mart on August 01, 2013, 16:00
Im universal :) so +941224524201214751121541561412455

Wot :|

I've added a new updated version to it at the opening post.
Title: Re: Players to see own packetloss
Post by: Winkle on August 03, 2013, 18:16
Quote from: brane on July 31, 2013, 22:47
+1
Title: Re: Players to see own packetloss
Post by: Ethan on August 03, 2013, 20:41
so F5 packetloss is us to the server connection and /network ID is packetloss server to us??  I dont get it
Title: Re: Players to see own packetloss
Post by: Bruno_2MLG4CT on August 03, 2013, 21:22
Quote from: Ethan on August 03, 2013, 20:41
so F5 packetloss is us to the server connection and /network ID is packetloss server to us??  I dont get it
Just think about F5 packletoss is wrong and /network ID packetloss is right ( i don't get it either )
Title: Re: Players to see own packetloss
Post by: Boy on August 04, 2013, 13:43
the F5 thingy is in all servers right?
so you only see the connection between your pc and modem?

/network gives the connection between your pc and the host.

correct me if i'm not right.
Title: Re: Players to see own packetloss
Post by: Dobby on August 04, 2013, 18:33
Quote from: Madeon on August 04, 2013, 13:43
the F5 thingy is in all servers right?
so you only see the connection between your pc and modem?

/network gives the connection between your pc and the host.

correct me if i'm not right.

I've never actually figured out what F5 does.

The command i've suggested gives you your connection between your PC and the host yes :)

Title: Re: Players to see own packetloss
Post by: iDarkRain on August 04, 2013, 19:02
1
Title: Re: Players to see own packetloss
Post by: Boy on August 04, 2013, 19:02
Quote from: DobbysGamertag. on August 04, 2013, 18:33
Quote from: Madeon on August 04, 2013, 13:43
the F5 thingy is in all servers right?
so you only see the connection between your pc and modem?

/network gives the connection between your pc and the host.

correct me if i'm not right.

I've never actually figured out what F5 does.

The command i've suggested gives you your connection between your PC and the host yes :)
Yes and that command is atm only for moderators.
so it needs to be "unlocked" for all.
I don't see a safety thingor something why players shouldn't be able to check their OWN /network.

So if /network will be open for all.
then mick needs to lock it for the players to only see their own network stats.

Admins still need to see it from all people since we can kick players to safe them from smokey the de-synced-player-killer.  C:-)
Title: Re: Players to see own packetloss
Post by: iDarkRain on August 04, 2013, 19:04
Quote from: DobbysGamertag. on August 04, 2013, 18:33I've never actually figured out what F5 does.

The command i've suggested gives you your connection between your PC and the host yes :)

Really it shows the network data, but isn't accurate because its determinated by client.
Title: Re: Players to see own packetloss
Post by: iDarkRain on August 04, 2013, 19:58
I did a new command, it just says player's packetloss:

Under 2.0%:

(http://i.imgur.com/suMTLdF.png)

Over 2.0%:

(http://i.imgur.com/6J3noUn.png)






CMD:packetloss(playerid, params[])
{
#pragma unused params
new netstats[401], find;
GetPlayerNetworkStats(playerid, netstats, sizeof(netstats));
find = strfind(netstats, "Packetloss:"); find += 12;
strdel(netstats, 0, find);
find = strfind(netstats, "%");
strdel(netstats, find, sizeof(netstats));
new Float:packetloss = floatstr(netstats);
new temp[5];
format(temp, sizeof(temp), netstats);
if(floatcmp(packetloss, 2.0) == 1)
{
    format(netstats, sizeof(netstats), "Your packetloss is {FF0000}%s%s{FFFFFF}, you have to relog.", temp, "%%");
}
else
{
    format(netstats, sizeof(netstats), "Your packetloss is {00FF00}%s%s{FFFFFF}, it's fine.", temp, "%%");
}
SendClientMessage(playerid, -1, netstats);
return 1;
}
Title: Re: Players to see own packetloss
Post by: Twido on August 05, 2013, 00:29
all nice done and well. but where is muck huh?  :-\
Title: Re: Players to see own packetloss
Post by: Bruno_2MLG4CT on August 05, 2013, 00:40
Quote from: Twido on August 05, 2013, 00:29
all nice done and well. but where is muck huh?  :-\
Ireland.
Title: Re: Players to see own packetloss
Post by: Twido on August 05, 2013, 00:46
Quote from: brane on August 05, 2013, 00:40
Quote from: Twido on August 05, 2013, 00:29
all nice done and well. but where is muck huh?  :-\
Ireland.
he's in dubai. He found out that SAMP turned into kindergarden. Now he found oil and is driving in a mercedes instead of a peugeot 206
Title: Re: Players to see own packetloss
Post by: Bruno_2MLG4CT on August 05, 2013, 00:46
Quote from: Twido on August 05, 2013, 00:46
Quote from: brane on August 05, 2013, 00:40
Quote from: Twido on August 05, 2013, 00:29
all nice done and well. but where is muck huh?  :-\
Ireland.
he's in dubai. He found out that SAMP turned into kindergarden. Now he found oil and is driving in a mercedes instead of a peugeot 206
Gibe oil mick pls
Title: Re: Players to see own packetloss
Post by: Matias on August 09, 2013, 05:25
Added. It should be working at the next server update.