AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Set spectactor camera to just connected user (https://forums.alliedmods.net/showthread.php?t=210062)

Infernuz 03-05-2013 18:34

Set spectactor camera to just connected user
 
Well, the title says it all. I'm just wondering if it's possible. Have already searched a lot, but couldn't find just what I need.

I want to force a just connected player to use spectactor camera. When the player connects he isn't really in game. His team is set to CS_TEAM_UNASSIGNED and his m_iJoinedState looks like to be set to 4. And of course, he's not alive.

So, I am unable to use the famous DEAD_DEAD flag to force him to spectactor mode.

PHP Code:

set_pev(idpev_deadflagDEAD_DEAD); 

Of course I could force the player to join ct or t, kill them, and set them to spectactors. But! It's not really a solution to the problem when I only need the spectating camera just right when he connects.


EDIT: Solved the problem by hooking spectator in original choose team menu. Ugly fix, but anyways. It works.


All times are GMT -4. The time now is 21:42.

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