PDA

View Full Version : Is there any more documentation?


sschicken
04-05-2005, 18:41
I've been fairly able to navigate through the different classes and such of serverplugin_empty, but theres still a few questions I have in terms of how to modify things in game. I've found most everything can be found out from the IPlayerInfo, but I don't see how to change any of that directly. Is there any more documentation released by Valve about the different functions and calls of this? For now, I'm trying to figure out how to create entities, modify player health, position, change player models, and force client console commands.

I Usually learn pretty well by looking at how other source code works, but I cant find any open-source plugins that do any of this.

vancelorgin
04-05-2005, 18:48
There is no documentation.

<Valve> You can't do that from a server plugin


However, some people [cough] do it anyway. Use headers from the server module project to get CBaseEntity and other definitions, then do with them what you will. You have every function available to the server under linux, and all virtual functions under windows plus any you are willing to hard link or sig scan for.

Regarding creating entities, try searching the forums.. If you mean make your own custom entities like a firework or a capture point, then I'll tell you I'm working on my EEntityManager class now. Maybe I'll release it :/

sschicken
04-05-2005, 20:54
Not really custom entities. I'm not sure how well everything is supported, but the way I'd imagine giving a player a specific weapon is to check he has a slot for it (make room if need be by stripping the old one), and creating the entity of the weapon you want him to have in the same location as him.

sschicken
04-07-2005, 01:06
What header is the CBaseEntity class in? and If I use that as a header, can I just refer to the classes and functions in it like normal and they will all work OK?

vancelorgin
04-07-2005, 07:38
It's in 'baseentity.h' :s I've said it a million times - just copy the #includes from util.cpp or somwhere and slap them in your plugin with #define GAME_DLL 1 up top - it'll take some hacking of networkvar.h, but it'll work.

If you are under linux, you can use anything you want. Under windows, you are restricted to anything with 'virtual' by it.

Webring
04-07-2005, 18:14
It's in 'baseentity.h' :s I've said it a million times - just copy the #includes from util.cpp or somwhere and slap them in your plugin with #define GAME_DLL 1 up top - it'll take some hacking of networkvar.h, but it'll work.

If you are under linux, you can use anything you want. Under windows, you are restricted to anything with 'virtual' by it.

bro, post your hacked networkvar.h :D[/quote]

L. Duke
05-03-2005, 13:05
I have an unresolved external when I try to compile a plugin using CBaseEntity. What do I need to do to networkvar.h to fix this?
extern bool g_bUseNetworkVars;

EDIT: It's in a debug header so I compiled a release version and it worked. I'd like to be able to compile a debug version though.

fysh
05-03-2005, 16:14
If you compiled a debug version everything with baseentity will be wrong since the class is different when it is compiled in debug mode.