Raised This Month: $51 Target: $400
 12% 

No Deathcam


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Twelve-60
Senior Member
Join Date: Aug 2007
Old 03-16-2008 , 10:45   No Deathcam
Reply With Quote #1

I'm wondering if I can eradicate the deathcam all together and instantly move your view to the next player on your team.

I've tried to use SetClientViewEntity() and set it to another player on your team, but it will set the view point at their feet and will stay there forever (even after round restart - your view will still be following some guys feet lol)

Help!

Mod: CSS btw

- Twelve-60
__________________

Last edited by Twelve-60; 03-18-2008 at 01:44.
Twelve-60 is offline
sodafr
Member
Join Date: Apr 2007
Location: Paris, France
Old 03-16-2008 , 11:34   Re: No Deathcam
Reply With Quote #2

I am not sure that it is what you need but... maybe :
mp_forcecamera 1
sodafr is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 03-16-2008 , 12:48   Re: No Deathcam
Reply With Quote #3

i think even if you figure out how to do this, client won't be able to change the view after.
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
Twelve-60
Senior Member
Join Date: Aug 2007
Old 03-16-2008 , 20:57   Re: No Deathcam
Reply With Quote #4

Quote:
Originally Posted by sodafr View Post
I am not sure that it is what you need but... maybe :
mp_forcecamera 1
Nope, there is still a huge delay between dying and then being locked the next player

- Twelve-60
__________________
Twelve-60 is offline
pRED*
Join Date: Dec 2006
Old 03-16-2008 , 21:07   Re: No Deathcam
Reply With Quote #5

Using SetClientViewEntity you will definitely need to detect the new round and revert their view to themselves.

As for the location...

Hmm..

You could create some sort of invisible entity and make it follow the player (see the parachute threads for some help on this), then set your view to that.
Would give you more customisation about the orientation and location of the view.

And no firefox, I will not put a 'z' in my words. Fucker.
pRED* is offline
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 03-16-2008 , 21:14   Re: No Deathcam
Reply With Quote #6

spec_next? Not sure if the command is handled by the client or server, but worth a shot.. another alternative is changing the observer target through SetEntData or w/e.
__________________
sslice is offline
Twelve-60
Senior Member
Join Date: Aug 2007
Old 03-16-2008 , 23:13   Re: No Deathcam
Reply With Quote #7

Current code:

Code:
public Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new victim = GetClientOfUserId(GetEventInt(event,"userid"));
   
    new max_clients = GetMaxClients();
    
    for (new i = 1; i <= max_clients; i++)
    {
        if (IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == GetClientTeam(victim))
        {
            SetEntPropEnt(victim, Prop_Send, "m_hObserverTarget", i);
            SetEntPropEnt(victim, Prop_Send, "m_iObserverMode", 3);
            break;
        }
    }
}
I get a crosshair and it follows them but it's extremely buggy, I'm still not at their eyelevel and I can't switch players, if I try the camera goes inside the players head :/

When I have mp_forcecamera = 0 and m_iObserverMode = 4 (3rd person) it works, but I need mp_forcecamera 1 and I need 1st person

- Twelve-60
__________________

Last edited by Twelve-60; 03-21-2008 at 05:35.
Twelve-60 is offline
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 03-17-2008 , 22:15   Re: No Deathcam
Reply With Quote #8

You could always fade their screen black on death for a few seconds until it naturally switches to the next player (If what you were looking to do is prevent the person seeing who killed them).
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
Twelve-60
Senior Member
Join Date: Aug 2007
Old 03-18-2008 , 01:15   Re: No Deathcam
Reply With Quote #9

Unfortunately I need a seemless (no black screens etc) solution

- Twelve-60
__________________
Twelve-60 is offline
noob cannon lol
SourceMod Donor
Join Date: Sep 2005
Old 03-18-2008 , 19:50   Re: No Deathcam
Reply With Quote #10

Since nothing else works, you can set up the virtual function StartObserverMode through SDKTools and use that.

You can get the offset from here: http://wiki.alliedmods.net/CCSPlayer...%28SourceMM%29
noob cannon lol is offline
Send a message via AIM to noob cannon lol Send a message via MSN to noob cannon lol
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:15.


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