Raised This Month: $ Target: $400
 0% 

Force camera to find next player in Spec Mode.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Paulster1022
Member
Join Date: Apr 2006
Old 08-13-2014 , 18:17   Re: Force camera to find next player in Spec Mode.
Reply With Quote #1

I am able to tell when im not spectating in first person.

Code:
public plugin_init()
{
set_task(1.0, "check_spectating", 123094, "", 0, "b", 0)
}


public check_spectating()
{
	new id = blinkID()

	if(!is_user_connected(id) || cs_get_user_team(id) != CS_TEAM_SPECTATOR)
		return

	if( (1 << pev(id, pev_iuser1)) & ((1 << 1)|(1 << 2)|(1 << 4)))
    	{
        	new player = pev(id, pev_iuser2);
        	if(is_user_alive(player) )
        	{
            		g_target = player
    		}
	}

	else
	{
		client_print(id, print_chat, "Not spectating a Player!")
		// Switch to next alive player. How?

	}
}
*How can i switch camera to next alive player?
I want this because if no players are connected, camera goes to freelook. So every second I want to check if alive player is available....then move camera to alive player.

Last edited by Paulster1022; 08-13-2014 at 18:19.
Paulster1022 is offline
Send a message via AIM to Paulster1022
Reply



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 13:12.


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