Raised This Month: $ Target: $400
 0% 

Getting spectators name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 10-16-2010 , 11:37   Getting spectators name
Reply With Quote #1

Hey, is it possible to get a player that is spectating team ???

it's like
new spectator
if(!is_user_alive(spectator))
new szSpecName[33]
get_user_name(spectator, szSpecName, 32).

But how to check a player that is playing and being spectated by a spectator...

Last edited by reinert; 10-16-2010 at 11:43.
reinert is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-16-2010 , 12:01   Re: Getting spectators name
Reply With Quote #2

get_user_aiming()
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-16-2010 , 12:09   Re: Getting spectators name
Reply With Quote #3

get_user_aiming works when they are spectating someone? Interesting...
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-16-2010 , 12:46   Re: Getting spectators name
Reply With Quote #4

Yeah, it returns the Spcetated Players ID, because the Spectator is actually aiming the Player.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 10-16-2010 , 12:53   Re: Getting spectators name
Reply With Quote #5

You can get id of player being spectated using pev_iuser2.
Example:
http://forums.alliedmods.net/showthread.php?p=408500
__________________
Impossible is Nothing
Sylwester is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-16-2010 , 12:55   Re: Getting spectators name
Reply With Quote #6

another Solution, thanks =)
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 10-16-2010 , 14:01   Re: Getting spectators name
Reply With Quote #7

Quote:
Originally Posted by mottzi View Post
get_user_aiming()
I dont think so
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-16-2010 , 14:25   Re: Getting spectators name
Reply With Quote #8

I tested it...
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 10-17-2010 , 03:47   Re: Getting spectators name
Reply With Quote #9

Quote:
Originally Posted by mottzi View Post
I tested it...
Oh well i learn a new thing every day
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
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 10:18.


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