Because i've seen you are a coder yourself, i just post a snippet.
One of the stocks is from SMlib.
Spoiler
PHP Code:
#include <sourcemod>
#pragma semicolon 1
public OnPluginStart()
{
RegConsoleCmd("sm_test", Command_Test);
}
public Action:Command_Test(client, args)
{
if(IsClientValid(client))
{
new target = Client_GetObserverTarget(client);
if(IsClientValid(target))
{
PrintToChat(client, "Your Target is: %N", target);
}
else
{
PrintToChat(client, "Your Target is not available");
}
}
return Plugin_Handled;
}
stock Client_GetObserverTarget(client)
{
return GetEntPropEnt(client, Prop_Send, "m_hObserverTarget");
}
stock bool:IsClientValid(id)
{
if(id > 0 && id <= MAXPLAYERS && IsClientInGame(id))
{
return true;
}
return false;
}
Yours sincerely
Impact
__________________