Raised This Month: $ Target: $400
 0% 

Detecting Something


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zombieplague
Veteran Member
Join Date: Apr 2009
Old 01-31-2010 , 03:34   Detecting Something
Reply With Quote #1

Does anyone know how to detect when a user is downloading something from your server or connecting or specting.
zombieplague is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 01-31-2010 , 04:55   Re: Detecting Something
Reply With Quote #2

Try

PHP Code:
register_forward(FM_ClientConnect"your_function")

public 
your_function(id)
{
//stuff

or

PHP Code:
register_forward(FM_SpectatorConnect"your_function")

public 
your_function(id)
{
//stuff


Use
PHP Code:
FM_SpectatorThnk 
to detect user specting.
dFF is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 01-31-2010 , 05:40   Re: Detecting Something
Reply With Quote #3

Quote:
Originally Posted by dFF View Post
Try

PHP Code:
register_forward(FM_ClientConnect"your_function")
 
public 
your_function(id)
{
//stuff

or

PHP Code:
register_forward(FM_SpectatorConnect"your_function")
 
public 
your_function(id)
{
//stuff
 

Use
PHP Code:
FM_SpectatorThnk 
to detect user specting.

Can you label which is which ?

Like this is what something.
zombieplague is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 01-31-2010 , 06:19   Re: Detecting Something
Reply With Quote #4

Both codes try to do the same, you must test it to see if it works.
The last code is the answer to your last question ("or specting").
Seta00 is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 01-31-2010 , 06:43   Re: Detecting Something
Reply With Quote #5

Quote:
Originally Posted by Seta00 View Post
Both codes try to do the same, you must test it to see if it works.
The last code is the answer to your last question ("or specting").
Like this ?

PHP Code:
register_forward(FM_SpectatorThnk"your_function")
 
public 
your_functionid )
{
         if ( 
user_is_aliveid )
         {
               
blablablabla
         
}

zombieplague is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 01-31-2010 , 06:46   Re: Detecting Something
Reply With Quote #6

Yes, if you want to detect a spectator connecting.
Seta00 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-31-2010 , 07:13   Re: Detecting Something
Reply With Quote #7

spectator connect and spectator think are for HLTVs, aka clients with flag FL_SPECTATOR.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 01-31-2010, 07:37
ujjl
This message has been deleted by ujjl. Reason: Solved
zombieplague
Veteran Member
Join Date: Apr 2009
Old 01-31-2010 , 07:45   Re: Detecting Something
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
spectator connect and spectator think are for HLTVs, aka clients with flag FL_SPECTATOR.
Can you show me the full code of those 3 that i mention ?
zombieplague is offline
nakash
Member
Join Date: Jan 2009
Old 01-31-2010 , 08:51   Re: Detecting Something
Reply With Quote #9

Where to put the register_forward function?
I tried to put this under plugin_init and it returned an error [undefinded symbol].
nakash is offline
ujjl
Senior Member
Join Date: Jul 2009
Location: Hungary
Old 01-31-2010 , 09:16   Re: Detecting Something
Reply With Quote #10

Maybe you write:
Code:
FM_SpectatorThnk
but its
Code:
FM_SpectatorThink
__________________
- blupi blupi
ujjl is offline
Reply


Thread Tools
Display Modes

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 07:21.


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