FCNPC icon indicating copy to clipboard operation
FCNPC copied to clipboard

Default ping value

Open ziggi opened this issue 8 years ago • 6 comments

Default ping value is -1, this should be 0 if it's possible.

ziggi avatar Jul 18 '17 17:07 ziggi

Why? NPCs don't have ping right? Why assign them a possible value?

rt-2 avatar Jul 18 '17 18:07 rt-2

When I use /rcon players, I get this: Ping and IP 1 to 5 are standard NPCs, 6 is me, and 46 to 49 are FCNPCs. Notice the that the IP is different as well, not that it really bothers anyone I think though.

WoutProvost avatar Jul 18 '17 21:07 WoutProvost

I still don't see the problem.... I hope I'm not getting on your nerves

rt-2 avatar Jul 18 '17 21:07 rt-2

Me neither, however I can think of something like this:

new ping = GetPlayerPing(playerid);
if(ping < 0 || ping == 65535) {
	//Ping is invalid
} else {
	//Ping is valid
}

WoutProvost avatar Jul 18 '17 21:07 WoutProvost

0ms is possible and actually highly likely in some configurations and high end machines. -1 is impossible ping so i guess it should stay -1.

But in any case its easy to hook and return 0 in pawn instead of -1 ....

BitFros7y avatar Jul 20 '17 03:07 BitFros7y

Done.

ziggi avatar Nov 04 '17 20:11 ziggi