Raised This Month: $ Target: $400
 0% 

get hltv delay value


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bol
Member
Join Date: Feb 2014
Old 06-04-2014 , 01:01   get hltv delay value
Reply With Quote #1

Hello,

Is there a way for the game server to check connected hltv delay time?
And lets say if it is below 15seconds kick it?
bol is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-04-2014 , 01:45   Re: get hltv delay value
Reply With Quote #2

I don't think there is because the HLTV is treated like any other player (other than it's SteamID and such).

I wonder if maybe it's in the user info. Maybe try get_user_info() with some stuff and see if it broadcasts that kind of information.
__________________

Last edited by fysiks; 06-04-2014 at 01:46.
fysiks is offline
bol
Member
Join Date: Feb 2014
Old 06-04-2014 , 11:53   Re: get hltv delay value
Reply With Quote #3

hm interesting that could proven to be helpful.
for information the delay time is visible in status I reckon you know this, is there a way to retrieve it from there?
Its position is that of user frags, perhaps get_user_frags?
bol is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-04-2014 , 12:38   Re: get hltv delay value
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
I don't think there is because the HLTV is treated like any other player (other than it's SteamID and such).

I wonder if maybe it's in the user info. Maybe try get_user_info() with some stuff and see if it broadcasts that kind of information.
actually HLTV is not treated like any other player, HLTV has different status output

Code:
status
hostname:  Counter-Strike
version :  48/1.1.2.6 5758 secure  (10)
tcp/ip  :  192.168.1.69:27015
map     :  skate_dusts at: 0 x, 0 y, 0 z
players :  2 active (20 max)

#      name userid uniqueid frag time ping loss adr
# 1 "www.kz-arg.com.ar" 1 BOT   0 02:15    0    0
# 2 "HLTV Proxy" 2 HLTV hltv:0/128 delay:30 01:46 127.0.0.1:27020
2 users
jimaway is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-04-2014 , 16:56   Re: get hltv delay value
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
actually HLTV is not treated like any other player, HLTV has different status output

Code:
status
hostname:  Counter-Strike
version :  48/1.1.2.6 5758 secure  (10)
tcp/ip  :  192.168.1.69:27015
map     :  skate_dusts at: 0 x, 0 y, 0 z
players :  2 active (20 max)

#      name userid uniqueid frag time ping loss adr
# 1 "www.kz-arg.com.ar" 1 BOT   0 02:15    0    0
# 2 "HLTV Proxy" 2 HLTV hltv:0/128 delay:30 01:46 127.0.0.1:27020
2 users
Oh. I guess it's been too long since I've used HLTV. It's probably possible then.
__________________
fysiks is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-05-2014 , 00:07   Re: get hltv delay value
Reply With Quote #6

You have access to hltv proxy?

or just try:

PHP Code:
    new sDelay[3];
    
get_user_info(id,"delay",sDelay,charsmax(sDelay)); 
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
bol
Member
Join Date: Feb 2014
Old 06-06-2014 , 13:59   Re: get hltv delay value
Reply With Quote #7

Having no luck so far, am getting
PHP Code:
get_user_info(id,"delay",sDelay,charsmax(sDelay)); 
on the same piece of code that im getting the hltvip so it should work. anyone else willing to try this?
On the hltv the command 'setinfo' is not registered. yet hltv clearly passes info to status.

Think ill have to go try query_client_cvar.

Last edited by bol; 06-06-2014 at 13:59.
bol is offline
vlad_slick
Member
Join Date: Jul 2009
Old 06-07-2014 , 02:20   Re: get hltv delay value
Reply With Quote #8

Try this:
PHP Code:
#include <amxmodx>

#define PLUGIN "HLTV Delay Checker"
#define VERSION "1.0"
#define AUTHOR "you"

#define MIN_DELAY 15

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id) {
    if(
is_user_hltv(id)) {        
        static 
hltv_delay[3
        
get_user_info(id"hdelay"hltv_delay2)
        if(
str_to_num(hltv_delay)<MIN_DELAY)
            
server_cmd("kick #%d ^"HLTV Delay(%dtoo low (MAX=%d)^" ",get_user_userid(id), str_to_num(hltv_delay),MIN_DELAY)
        
    }


Last edited by vlad_slick; 06-07-2014 at 02:20.
vlad_slick is offline
bol
Member
Join Date: Feb 2014
Old 06-13-2014 , 04:44   Re: get hltv delay value
Reply With Quote #9

I assume "hdelay" was a type o and meant to be "delay"

Code:
<Kicked : "HLTV delay<0> too low <MAX=15>" >.
On the hltv console.
so far I havent been able to get the hltv delay value.
When the gameserver knows the given hltv delay time from 'status' there must be a way to retrieve it right?

Last edited by bol; 06-13-2014 at 04:46.
bol is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-13-2014 , 06:47   Re: get hltv delay value
Reply With Quote #10

Or it was not a typo and you should try out the code he has probably confirmed working. I think hdelay is the correct info name.
__________________
In Flames we trust!
Nextra is offline
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 09:44.


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