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
__________________