i looked at sourcemod source code (wow, so many "souce"s)

but it was too difficult to understand it, because, it was made in a
framework, that i must to leran first..........

sourcemod, may it be easier... but
if a made a CLIENT plugin with it...... it will need a sourcemod.dll, to
make my plugin work?

2009/12/9 Jacob Heidt <[email protected]>

> I would recommend you take a look at MetaMod:Source, even if you don't use
> the framework for your server plugin, the underlying source code should
> help
> you significantly in understanding and creating a server plug in.
>
> -jheidt
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of JoeX
> Sent: Wednesday, December 09, 2009 8:11 AM
> To: Discussion of Half-Life Programming
> Subject: Re: [hlcoders] tf2 client plugin question
>
> thank you AzuiSleet!
>
> but it was needed to put:
>
> #include <cdll_int.h>
>
> that's make it work...., thanks A LOT
>
> now, i have other noob questions....
>
> (1) is ok to use: engineclient->ClientCmd_Unrestricted(msg); ???
>
> i dont know how to get rid of the FCVAR_CLIENTCMD_CAN_EXECUTE error in game
> console
> --------------------------------------
> (2) i got something like:
>
> static ConVar empty_cvar("plugin_empty", "0", 0, "Example plugin cvar");
>
> how can i put some code, when this cvar is changed?, i want to reassing a
> counter to zero, when the user chage plugin_empty cvar value in their
> console (counter = 0)
> --------------------------------------
> (3) how can i send a message to player? (to a client)
>
> i saw this code, and it works when i have the pEntity (edict_t
> *pEntity)....
> but inside a CON_COMMAND......
>
> CON_COMMAND(hlds_message, "send a message" )
> {
>        KeyValues *kv = new KeyValues( "menu" );
>        kv->SetString( "title", "hello");
>        kv->SetInt( "level", 1 );
>        kv->SetInt( "time", 40 );
>
>        helpers->CreateMessage(pEntity, DIALOG_MSG, kv, this);
>        kv->deleteThis();
> }
>
>
> this was my best approach:
>
> int cliente = engineclient->GetLocalPlayer();
> edict_t *pEntity = engine->PEntityOfEntIndex(cliente)
>
> but client console says: "Invaid pEntity"
>
> of course..... GetLocalPlayer() always return zero....... what i do now?
> --------------------------------
>
>
> thank you in advance..... i'm sure this will be userfull for others.
>
> 2009/12/9 AzuiSleet <[email protected]>
>
> > Well you should be getting IVEngineClient instead of IVEngineServer,
> > it has the method you are looking for.
> >
> > On Wed, Dec 9, 2009 at 2:10 AM, JoeX <[email protected]> wrote:
> > > hello everyone!
> > >
> > > this is my first post, so let me introduce myself. My name is Joe, and
> > i'm
> > > from Chile (latin america), as you can see, inglish is not my native
> > > language, but i'll do my best :D, thank you all in advance for your
> > > attention.
> > >
> > > ok, here's where i'm stuck
> > >
> > > i'm trying to make a clien-side plugin for TF2.... compiling a dll and
> > > writing a .vdf and put them in /addons folder...
> > > my plugin it will make easier the tak of recording demos, by console
> > > commands.
> > >
> > > this is what i got:
> > >
> > > CON_COMMAND(hlds_grabar, "comienza a grabar una demo")
> > > {
> > >    engine->ServerCommand("record temp");
> > > }
> > >
> > > but this command is not working
> > > console says:
> > > Error, bad server command record temp
> > >
> > > i think this happens cause i'm trying to execute a client command using
> > the
> > > ServerCommand method... and "record" is not a server command....
> > >
> > > ok.... i google it for days a solution and then, i could make this:
> > >
> > > CON_COMMAND(hlds_grabar, "comienza a grabar una demo")
> > > {
> > >    int cliente = g_EmtpyServerPlugin.GetCommandIndex() + 1;
> > >    helpers->ClientCommand(engine->PEntityOfEntIndex(cliente),"record
> > > temp");
> > > }
> > >
> > > but this is not working too......
> > > console says:
> > > !!!
> > > CServerPlugin::ClientCommand:  Some entity tried to stuff 'record temp'
> > to
> > > console buffer of entity 0 when maxclients was set to 24, ignoring
> > >
> > >
> > > maybe because i still don't understand how pEntity works..... (can you
> > tell
> > > me how?)
> > >
> > >
> > > maybe this is a very noob question, but, how can i get this work?
> > > it has really hard to me, cause there's not much updated documentation.
> > >
> > > thank you in advance for you attention!, Bye!
> > >
> > > -Joe
> > >
> > > PD: if u want to see the whole code, here is:
> > > http://joecabezas.pastebin.com/f7ef2afae
> > > _______________________________________________
> > > 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