AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ways to get player's ping? (https://forums.alliedmods.net/showthread.php?t=47289)

- Billy The Kid - 11-14-2006 06:18

Ways to get player's ping?
 
I would like to get player's ping from a thread that is already reading it, for example - scoreboard ping, or even better if some other thread gets ping from players more often... Is there a way if get_user_ping doesn't work this way?

Sry if I misused some of the terms - bad translation :D
Thx in advance ;)

dutchmeat 11-14-2006 07:20

Re: Ways to get player's ping?
 
post the code you are using.
You can use get_user_ping like this:

Code:

new ping, loss
get_user_ping(id,ping, loss)
console_print(id,"%i",ping)


- Billy The Kid - 11-14-2006 07:53

Re: Ways to get player's ping?
 
No, you didn't understand the point... I know how to do it with get_user_ping, that's easy...

I'm interested in way get_user_ping function is getting the ping... and second, I'm interested in any other way like getting ping from scoreboard or any other thread that is constantly getting player ping...

dutchmeat 11-14-2006 08:09

Re: Ways to get player's ping?
 
You can try:
Code:

new userping[33]
public server_frame() {
for(new a = 1; a <= get_playersnum(); a++) {
new ping[8]
get_user_info(a,"ping",ping,7)
userping[a] = ping
}

OR:

Code:

new userping[33]
public server_frame() {
for(new a = 1; a <= get_playersnum(); a++) {
new ping, loss
get_user_ping
(id,ping, loss)
userping[a] = ping
}



Rolnaaba 11-14-2006 09:35

Re: Ways to get player's ping?
 
he knows that get_user_ping gets the user's ping DUH he wants the backing code that the function get_user_ping is created with see:
Quote:

Originally Posted by - Billy The Kid - (Post 403139)
No, you didn't understand the point... I know how to do it with get_user_ping, that's easy...

I'm interested in way get_user_ping function is getting the ping... and second, I'm interested in any other way like getting ping from scoreboard or any other thread that is constantly getting player ping...

if I am not mistaking this belongs in module coding help :/

- Billy The Kid - 11-14-2006 10:13

Re: Ways to get player's ping?
 
Yap, Rolnaaba is right... Module coding? OK, I'll try there... Thx

Thx for effort dutchmeat...

What about scoreboard player ping or any other thread that is already getting the ping?

Rolnaaba 11-14-2006 12:06

Re: Ways to get player's ping?
 
scoreboard player ping is hardcoded into game I dunno how but if you can disect game source code go for it :D


All times are GMT -4. The time now is 07:01.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.