Raised This Month: $ Target: $400
 0% 

get_user_latency(id)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 10-30-2009 , 09:30   Re: get_user_latency(id)
Reply With Quote #1

maybe there is some to way to hook a message that sends latency to score board?


yeah here it is! = )
PHP Code:
message_begin(MSG_ONE_UNRELIABLESVC_PINGS_id)
write_byte((g_offset[0] * 64) + ((player) - 1))
write_short(g_ping[0])
write_byte((g_offset[1] * 128) + (* (player 1)))
write_short(g_ping[1])
write_byte((* (player 1)))
write_short(ping// <---- It's latency I think
write_byte(0)
message_end()
//(C) MeRcyLeZZ 
but how to hook this message?

Last edited by Empowers; 10-30-2009 at 09:40.
Empowers is offline
Send a message via ICQ to Empowers
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-30-2009 , 09:57   Re: get_user_latency(id)
Reply With Quote #2

register_message( SVC_PINGS, ... ); ?
__________________
xPaw is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-30-2009 , 10:02   Re: get_user_latency(id)
Reply With Quote #3

register_event( "17", "Event_Ping", "b" );

But I doubt this message is sent.
__________________
Arkshine is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 10-30-2009 , 11:15   Re: get_user_latency(id)
Reply With Quote #4

= ((
doesn't work both =((
PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_message(SVC_PINGS,"Event_Ping")
    
register_event"17""Event_Ping""b" );
}

public 
Event_Ping()
    
server_print("OMG O_o"
Empowers is offline
Send a message via ICQ to Empowers
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-30-2009 , 12:59   Re: get_user_latency(id)
Reply With Quote #5

Quote:
But I doubt this message is sent.
__________________
Arkshine is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 10-30-2009 , 15:29   Re: get_user_latency(id)
Reply With Quote #6

but if creators made a constant in include for this message. It must be used anywhere.
Empowers is offline
Send a message via ICQ to Empowers
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-30-2009 , 15:31   Re: get_user_latency(id)
Reply With Quote #7

You have a lot of SVC_ which are not sent or we can't hook, but we can still use them.
__________________
Arkshine is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 10-30-2009 , 16:33   Re: get_user_latency(id)
Reply With Quote #8

= ( So maybe any other way to get latency? maybe some kind of formula?

I'm sure in formula must be players ping and players fps. And maybe servers fps.

Last edited by Empowers; 10-30-2009 at 19:05.
Empowers is offline
Send a message via ICQ to Empowers
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:37.


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