Keeper you're the bomb. You gave me what I was asking for, but I think I was asking for the wrong thing
What the above code does is added 1 to the actual Terrorist team score on the scoreboard. What I want to do is add 1 to the individual players on the Terrorist team.
With your help I was able to find: CBaseEntity::AddPoints(
int score, bool bAllowNegativeScore ). I'm trying to use it like so:
Code:
CBaseEntity* pBaseEnt = GetBaseEnt( userid );
pBaseEnt->AddPoints( 1, true );
-- snip --
CBaseEntity* CEmptyServerPlugin::GetBaseEnt( int userid )
{
for( int i = 0; i < engine->GetEntityCount(); i++ )
{
edict_t* pEntity = engine->PEntityOfEntIndex(i);
if( pEntity && !pEntity->IsFree() )
{
if( FStrEq( pEntity->GetClassName(), "player" ) )
{
CBaseEntity* baseEnt = pEntity->GetUnknown()->GetBaseEntity();
if( engine->GetPlayerUserId( pEntity ) == userid )
{
return baseEnt;
}
}
}
}
return NULL;
}
But I get the folling linking error on line pBaseEnt->AddPoints( 1,
true);
Error 4 error LNK2019: unresolved external symbol "public: void __thiscall CBaseEntity::AddPoints(int,bool)".
I know this is more of a C++ question. But what am I missing?