AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Force a spectating player into First Person mode (https://forums.alliedmods.net/showthread.php?t=90897)

joaquimandrade 04-24-2009 07:16

Force a spectating player into First Person mode
 
I would like to know the cleanest way of forcing a player to spectate another player in the First Person mode.

ConnorMcLeod 04-24-2009 07:50

Re: Force a spectating player into First Person mode
 
Poor way : client_cmd(id, "+attack;wait;-attack")
All other way i tried were buggy with the view, but i haven't made lot of tests, may be that more than setting iuser, you would have to set player origin/angles.

Nextra 04-24-2009 07:58

Re: Force a spectating player into First Person mode
 
Detecting mode change sould be possible with this message, detecting player change should be possible with this or this event/message.

/edit: Ok, if setting iuser1/2 does not work I don't have an idea, sorry.

joaquimandrade 04-24-2009 08:00

Re: Force a spectating player into First Person mode
 
Quote:

Originally Posted by ConnorMcLeod (Post 812934)
Poor way : client_cmd(id, "+attack;wait;-attack")
All other way i tried were buggy with the view, but i haven't made lot of tests, may be that more than setting iuser, you would have to set player origin/angles.

Probably i will based it on this:

PHP Code:

engclient_cmd(id,"spec_mode","4"

I also thought on:

PHP Code:

set_pev(id,pev_movetype,MOVETYPE_FOLLOW)
set_pev(id,pev_aiment,2

But it doesn't work. Probably because the user is dead

Thanks for helping me.


Quote:

Originally Posted by Nextra (Post 812940)
Detecting mode change sould be possible with this message, detecting player change should be possible with this or this event/message.

Hooking and modifying these messages with set_msg_arg (or blocking it) could do it?

No. Modifying those messages just lead to changing the visual information of the health of the spectated

Nextra 04-24-2009 08:04

Re: Force a spectating player into First Person mode
 
Yes. I deleted that part because I noticed that just a second after posting. Sadly my connection to the servers is quite slow atm so it took its time :)

joaquimandrade 04-24-2009 08:07

Re: Force a spectating player into First Person mode
 
Quote:

Originally Posted by Nextra (Post 812944)
Yes. I deleted that part because I noticed that just a second after posting. Sadly my connection to the servers are quite slow atm so it took its time :)

I'm also having delays when connecting to the forums.

xPaw 04-24-2009 09:19

Re: Force a spectating player into First Person mode
 
An question off of topic.
How to block spec msgs 'Free Look', 'First Person' and such.

ConnorMcLeod 04-24-2009 10:12

Re: Force a spectating player into First Person mode
 
I'm not sure that engclient_cmd can be used with spec_mode cmd, and with client_cmd, due to lag, player could still abuse.

fysiks 04-24-2009 16:15

Re: Force a spectating player into First Person mode
 
There is a DOD server that I play on that you can only spec in first person mode. Very Very annoying. So, it's possible.

ConnorMcLeod 04-24-2009 16:30

Re: Force a spectating player into First Person mode
 
Quote:

Originally Posted by fysiks (Post 813258)
There is a DOD server that I play on that you can only spec in first person mode. Very Very annoying. So, it's possible.

For every player, it's doable by cvar that's not what joaquim want's, actually, for a LAN player to spec his CO-LAN-player is a really good idea, even if TS ghost is still possible (ban is good).


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

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