AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get the id of the person i spectate (https://forums.alliedmods.net/showthread.php?t=22714)

Obbin 01-02-2006 12:54

Get the id of the person i spectate
 
How to get the id of the person that i spectate?
It should owrk for locked chase cam, free chase cam and first person.

Xanimos 01-02-2006 13:27

Use the event "SpecHealth2" I can't remember which arg is which persons id search the forums it was discussed before.

Brad 01-02-2006 14:31

Most recently... http://forums.alliedmods.net/showthread.php?p=187401

Obbin 01-02-2006 14:46

I understood nothing of that talk. :?
Isn't it possible to make a simple function that returns the id of the person "id" is spectating?

like
Code:
new Spectating = get_user_specting(id)

Brad 01-02-2006 15:06

Not unless you code get_user_spectating yourself. If you'd care to hold on a few days, I'll post the necessary code to do this.

Obbin 01-02-2006 15:46

Thank you so mutch!!
Ill watch this thread..

v3x 01-02-2006 16:49

Code:
register_event("StatusValue", "GetSpec", "bd", "1=2");
Code:
public GetSpec( id ) {   new x = read_data(2);   if(!is_user_connected(x)) return;     new name[33];   get_user_name(x, name, 32);   client_print(id, print_center, "You are spectating %s", name); }
Something I used for a plugin I made before. 'x' holds the person's ID that you're specatating, if I'm correct.


All times are GMT -4. The time now is 15:44.

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