Yay! We did it. Thank you for your help :*
Create a new entity(point_viewcontrol), enable it and attach to player.
https://forums.alliedmods.net/showpo...10&postcount=4
PHP Code:
public SetClientCameraStatic(client)
{
SetEntProp(client, Prop_Send, "m_iObserverMode", 1);
//SetEntProp(client, Prop_Send, "m_iObserverMode", 0);
/* Create the Camera Entity */
new entCamera = CreateEntityByName("point_viewcontrol");
decl String:sWatcher[64];
Format(sWatcher, sizeof(sWatcher), "target%i", client);
/* Sets the clients Targetname to their Index */
DispatchKeyValue(client, "targetname", sWatcher);
if(IsValidEntity(entCamera))
{
//Name of the Camera Entity
DispatchKeyValue(entCamera, "targetname", "playercam");
//DispatchKeyValue(entCamera, "target", sWatcher);
//Amount of time to stay active
DispatchKeyValue(entCamera, "wait", "3600");
DispatchSpawn(entCamera);
TeleportEntity(entCamera, g_fPos, g_fAng, NULL_VECTOR);
//SetVariantString(sWatcher);
//AcceptEntityInput(entCamera, "SetParent", client, entCamera, 0);
SetVariantString(sWatcher);
AcceptEntityInput(entCamera, "Enable", client, entCamera, 0);
/* Stores the Camera index to the client */
ClientCamera[client] = entCamera;
}
}
__________________