Raised This Month: $ Target: $400
 0% 

Detect HLTV without is_user_hltv()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zefir
Member
Join Date: Oct 2007
Location: Kiev, Ukraine
Old 12-30-2008 , 00:20   Detect HLTV without is_user_hltv()
Reply With Quote #1

Hi guys!

How detecting HLTV in client_connect() or in client_authorized(). In this calls is_user_hltv() always returned 0.

I cannot detect HLTV for rezerved slot special for him
__________________

Last edited by Zefir; 12-30-2008 at 00:23.
Zefir is offline
Send a message via ICQ to Zefir
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-30-2008 , 00:24   Re: Detect HLTV without is_user_hltv()
Reply With Quote #2

If you're not running bots, check if it's a bot.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Zefir
Member
Join Date: Oct 2007
Location: Kiev, Ukraine
Old 12-30-2008 , 00:43   Re: Detect HLTV without is_user_hltv()
Reply With Quote #3

Not work
Quote:
L 12/30/2008 - 073:04: World triggered "Round_Start"
[MasteR]Demo<1> INFOCHANGE! HLTV = 0
[MasteR]Demo<1> INFOCHANGE! HLTV = 0
[MasteR]Demo<1> CONNECT! HLTV = 0
[MasteR]Demo<1> AUTHORIZED! HLTV = 0
[MasteR]Demo<1> PUTINSERVER! HLTV = 1
[MasteR]Demo<1> INFOCHANGE! HLTV = 1
[MasteR]Demo<1> COMMAND 'spectate' HLTV = 1
[MasteR]Demo<1> COMMAND 'VModEnable' HLTV = 1
[MasteR]Demo<1> COMMAND 'vban' HLTV = 1
[MasteR]Demo<1> INFOCHANGE! HLTV = 1
Code:
return ( is_user_hltv(id) || (is_user_connecting(id) && is_user_bot(id)))
__________________
Zefir is offline
Send a message via ICQ to Zefir
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-30-2008 , 01:20   Re: Detect HLTV without is_user_hltv()
Reply With Quote #4

I think you can only check is_user_hltv() once it's connected, so try getting the value on client_putinserver.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Zefir
Member
Join Date: Oct 2007
Location: Kiev, Ukraine
Old 12-30-2008 , 01:24   Re: Detect HLTV without is_user_hltv()
Reply With Quote #5

Thanks Hawk.

__________________
Zefir is offline
Send a message via ICQ to Zefir
Zefir
Member
Join Date: Oct 2007
Location: Kiev, Ukraine
Old 07-05-2009 , 09:21   Re: Detect HLTV without is_user_hltv()
Reply With Quote #6

Thanks DJ_WEST from http://reallite.cs2.ru/
PHP Code:
/*-----------------------------------------------------------------------------
        Detect HLTV
-----------------------------------------------------------------------------*/
public bool:my_is_user_hltv(id) {
        if (
is_user_connected(id))
                return 
is_user_hltv(id)

        static 
sHLTV[2]
        
get_user_info(id"*hltv"sHLTVcharsmax(sHLTV))

        return 
bool:equal(sHLTV"1")

__________________

Last edited by Zefir; 07-05-2009 at 09:28. Reason: change code into php :)
Zefir is offline
Send a message via ICQ to Zefir
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:17.


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