AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detect HLTV without is_user_hltv() (https://forums.alliedmods.net/showthread.php?t=82788)

Zefir 12-30-2008 00:20

Detect HLTV without is_user_hltv()
 
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 :(

Hawk552 12-30-2008 00:24

Re: Detect HLTV without is_user_hltv()
 
If you're not running bots, check if it's a bot.

Zefir 12-30-2008 00:43

Re: Detect HLTV without is_user_hltv()
 
Not work :(
Quote:

L 12/30/2008 - 07:33: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)))

Hawk552 12-30-2008 01:20

Re: Detect HLTV without is_user_hltv()
 
I think you can only check is_user_hltv() once it's connected, so try getting the value on client_putinserver.

Zefir 12-30-2008 01:24

Re: Detect HLTV without is_user_hltv()
 
Thanks Hawk.

:(

Zefir 07-05-2009 09:21

Re: Detect HLTV without is_user_hltv()
 
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")




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

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