Question ( Once again :p )
#1

Is there a way to detect the SERVERS ping?
Reply
#2

You mean this?
Reply
#3

Eh, yeah, but via a script or something xd
Reply
#4

There is a GetPlayerPing function. Read more about it here: https://sampwiki.blast.hk/wiki/GetPlayerPing

Good luck!
Reply
#5

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
There is a GetPlayerPing function. Read more about it here: https://sampwiki.blast.hk/wiki/GetPlayerPing

Good luck!
I'm talking about the server ping, not a players ping.

What I'm trying to do, is;
pawn Код:
if(/*Function or w.e to get servers ping*/ >= 350)
{
    //Restart server script here
    return 1;
}
or w.e
Reply
#6

What are you asking is similar to going to cmd prompt, and typing "ping 127.0.0.1". Your ping is ~1. You need to understand what ping is before understanding what you are trying to do here.
Reply
#7

I don't think you can retrieve the ping from the server directly, i think you can only get player ping.
Reply
#8

What do you mean with ping of the server?

The ping that is shown in the server browser is the ping of the player that is going to connect anyway.
Reply
#9

Okay i got it ;__;
Reply
#10

0.3z RC5: - Added pawn native GetServerTickRate() to return the current tickrate (like FPS) of the server.

I am not confirmed though if it really works like that. Also, the server OWN ping would be obviously 1-10.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)