Thread: Private Data
View Single Post
theqizmo
Member
Join Date: Oct 2004
Old 12-22-2004 , 23:14  
Reply With Quote #19

No, he means use it something like this, this isn't a real life example, just showing you how you would use it;

Code:
PLUGIN_RESULT CPlugin::ClientCommand( edict_t *pEntity )
{
	CBaseEntity *pCBaseEntity = NULL;
	pCBaseEntity = pEntity->GetUnknown()->GetBaseEntity();

	if (pCBaseEntity)
	{
		int iCurrHealth = pCBaseEntity->GetHealth();
		pCBaseEntity->SetHealth(iCurrHealth - 5);
	}
	else
	{
		// Wasn't able to find the pointer
		return PLUGIN_CONTINUE;		
	}
}
theqizmo is offline
Send a message via ICQ to theqizmo Send a message via AIM to theqizmo Send a message via MSN to theqizmo