I know you can use GetUnknown for it, but I'm not sure if you're able to do
it within the CBasePlayer pointer like you can get FragCount() without doing
some sketchy linking.



----- Original Message -----
From: "LDuke" <[EMAIL PROTECTED]>
To: <hlcoders@list.valvesoftware.com>
Sent: Tuesday, May 03, 2005 3:52 PM
Subject: [hlcoders] increment frag count (server plugin)


> I have a server plugin working with CBaseEntity:
>
> CBaseEntity *m_pCBaseEntity = pEntity->GetUnknown()->GetBaseEntity();
> CBasePlayer *pCBPlayer = (CBasePlayer*) m_pCBaseEntity;
> int Frags = pCBPlayer->FragCount();
> int Deaths = pCBPlayer->DeathCount();
> int Armor = pCBPlayer->ArmorValue();
> //print fragcount
> char gBuffer[128];
> Q_snprintf(gBuffer,sizeof(gBuffer), "Frags:%i  Deaths:%i
>
Armor:%i\n",Frags,Deaths,Armor);
> engine->ClientPrintf( pEntity, gBuffer );
>
> What I really want to do is "pCBPlayer->IncrementFragCount(1);" but I
> get an error with the linker when I try that. How can I increment the
> frag count from a server plugin?
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to