Thread: No Deathcam
View Single Post
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