Yes you can, it works fine when I perform other actions with it, such as:

CBaseEntity * pBase=pEntity->GetUnknown()->GetBaseEntity();
if (pBase) {
    CBaseCombatCharacter * pCombat = pBase->MyCombatCharacterPointer();
    if (pCombat) {
        pCombat->Spawn();
    }
}

This works fine, I just tested it, and it loads on the server. If you want
my list of includes that allows me to use CBaseEntity and such, let me know
and I'll post it.


Daniel Jennings



----- Original Message -----
From: "Ronny Schedel" <[EMAIL PROTECTED]>
To: <hlcoders@list.valvesoftware.com>
Sent: Tuesday, February 22, 2005 10:44 AM
Subject: Re: [hlcoders] Server Plugins refusing to load


> You cant use CBaseEntity in a server plugin. There are
> unresolved symbols, so it cant be loaded by srcds.
>
> Greets
> Ronny
>
>
> > Thanks. Here's my suspicious code:
> >
> >        if ( FStrEq( pcmd, "!giveammo" ) )
> >        {
> >                CBaseEntity *
pBase=pEntity->GetUnknown()->GetBaseEntity();
> >                if (pBase) {
> >                        CBaseCombatWeapon * pWeapon =
> > pBase->MyCombatCharacterPointer()->GetActiveWeapon();
> >                        if (pWeapon) {
> >                                pWeapon->m_iClip1 = 1000;
> >                                pWeapon->m_iClip2 = 1000;
> >                        }
> >                }
> >                return PLUGIN_STOP;
> >        }
> >
> >
> > This is in SekkusuServerPlugin::ClientCommand( edict_t *pEntity )
> >
> > If I comment out the code changing m_iClip1 and m_iClip2, it still won't
> > load, but when I comment out
> > CBaseCombatWeapon * pWeapon =
> > pBase->MyCombatCharacterPointer()->GetActiveWeapon();
> >
> > It loads fine but I lose any functionality. The weird thing is that the
> > code
> > _should_ never execute until I send the command !giveammo in the
console,
> > and it compiles/builds fine it just won't load. I'm using the
> > Counter-Strike: Source most recent dedicated server DLL.
> >
> > Thank you,
> > Daniel Jennings
> >
> >
> > ----- Original Message -----
> > From: "Alfred Reynolds" <[EMAIL PROTECTED]>
> > To: <hlcoders@list.valvesoftware.com>
> > Sent: Monday, February 21, 2005 10:06 PM
> > Subject: RE: [hlcoders] Server Plugins refusing to load
> >
> >
> >> I will have a look at the code and see why it isn't doing this already.
> >>
> >> - Alfred
> >>
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On Behalf Of David
> >> Anderson
> >> Sent: Monday, February 21, 2005 9:30 PM
> >> To: hlcoders@list.valvesoftware.com
> >> Subject: Re: [hlcoders] Server Plugins refusing to load
> >>
> >> On linux, you can try to use something like strace (you may have to log
> >> the output) to catch where calls are messing up.  But in the end, it
> >> would be very helpful if Valve included some sort of
> >> dlerror()/FormatMessage() output when a plugin fails to load.
> >>
> >>       -----David "BAILOPAN" Anderson
> >>       http://www.sourcemod.net/
> >>
> >> Daniel Jennings wrote:
> >> > Is there any way to tell why my Server Plugins (on Linux dedicated
> >> > server) are refusing to load? They compile and link correctly but I
> >> > cannot tell why they wont load.
> >> >
> >> > Thank you,
> >> > Daniel Jennings
> >> >
> >> >
> >> > _______________________________________________
> >> > 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
> >>
> >>
> >> _______________________________________________
> >> 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
> >
>
>
> _______________________________________________
> 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