AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Getting spectators name (https://forums.alliedmods.net/showthread.php?t=140769)

reinert 10-16-2010 11:37

Getting spectators name
 
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...

mottzi 10-16-2010 12:01

Re: Getting spectators name
 
get_user_aiming()

nikhilgupta345 10-16-2010 12:09

Re: Getting spectators name
 
get_user_aiming works when they are spectating someone? Interesting...

mottzi 10-16-2010 12:46

Re: Getting spectators name
 
Yeah, it returns the Spcetated Players ID, because the Spectator is actually aiming the Player.

Sylwester 10-16-2010 12:53

Re: Getting spectators name
 
You can get id of player being spectated using pev_iuser2.
Example:
http://forums.alliedmods.net/showthread.php?p=408500

mottzi 10-16-2010 12:55

Re: Getting spectators name
 
another Solution, thanks =)

abdul-rehman 10-16-2010 14:01

Re: Getting spectators name
 
Quote:

Originally Posted by mottzi (Post 1326424)
get_user_aiming()

I dont think so :|

mottzi 10-16-2010 14:25

Re: Getting spectators name
 
I tested it... :twisted:

abdul-rehman 10-17-2010 03:47

Re: Getting spectators name
 
Quote:

Originally Posted by mottzi (Post 1326648)
I tested it... :twisted:

Oh well i learn a new thing every day :)


All times are GMT -4. The time now is 10:18.

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