Raised This Month: $ Target: $400
 0% 

[Proof of Concept] Sekkusu's MiniPlugin


  
 
 
Thread Tools Display Modes
Author Message
Sekkusu
Junior Member
Join Date: Dec 2004
Old 02-23-2005 , 21:21   [Proof of Concept] Sekkusu's MiniPlugin
#1

Source: http://www.foxdedicated.com/miniplugin.cpp
Linux Binary: http://www.foxdedicated.com/miniplugin_i486.so

Here is my proof of concept Server Plugin code showing how to incorporate CBaseEntity and CBaseCombatCharacter class functionality into Server Plugins.

Quote:
Features:

!disguise - Changes your Player Model to the model of the opposite team, but keeps you on the same team.

!enemyspawn - Teleports you to the enemy's spawn point, though you keep your original model.
This is simply a small plugin detailing how to utilize CBaseEntity and CBaseCombatCharacter classes with minimal specifics. This is not meant to be downloaded and immediately ran, but is intended for the learning Server Plugin developer to enhance his knowledge in the Server Plugin area.

MiniPlugin is great if you are trying to incorporate other classes into your Server Plugin but can't seem to use them correctly or can't seem to get the compiler to stop complaining about the included headers.

This was created on a Linux machine and was not tested in Windows, though the only difference should be the TEAMOFFSET, which is 144 in Linux and should therefore be 139 in Windows, but correct me if I am wrong.

Post any questions/comments here, email me at [email protected], or AIM me at LtSekkusu

Source: http://www.foxdedicated.com/miniplugin.cpp
Linux Binary: http://www.foxdedicated.com/miniplugin_i486.so
Sekkusu is offline
Rebell
Veteran Member
Join Date: Nov 2004
Location: GERMANY
Old 02-24-2005 , 02:05  
#2

Do you mean:

this plugin letz you switch the skins of the team for the WHOLE team od for one Player ?

And who can do this ? A admin or a player ? And how to do this ....

plz. a little more infos
__________________
Rebell is offline
Tim
Senior Member
Join Date: Dec 2004
Location: the Netherlands
Old 02-24-2005 , 03:34  
#3

Maybe you got the intention of his post wrong...
It's not as much about what the plugin does for
the moment as it is about the sourcecodes used
to make it work...

What he's done is create a plugin that uses both
CBaseEntity and CBaseCombatCharacter, which
as I understand it gave problems with server-
plugins before...

Seeing as to how he has now gotten it to work,
other scripters can take a look at his code and
use it to their liking...
(for instance 4HM | Geesu recreating WC3 Moles)

Best regards,
Tim
Tim is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 02-24-2005 , 07:42  
#4

Sekkusu, thanks a lot for the proof of concept! It will come in handy. Some of us have been using something similar, but we hadn't gotten it to work as well as you did.

Some comments/questions:
  • 1. Can you post this over in hl2coding.com's Server Plugins section? This is good stuff for those learning in that forum.
    2. I believe I read in the hlcoder's mailing list that you were having problems getting your plugin to load when you used certain functions from (I believe) CBaseCombatWeapon. I know this example is for CBaseEntity/CombatCharacter, but (a) did you have similar problems with any methods of these two classes and (b) do you have a list of the problems you had with CBaseCombatWeapon?
    3. What do you predict the likelihood is that utilizing the SDK's CBase* classes will break due to significant divergence in future CS:S engine updates? Are there any areas you feel are particularly at risk to an update? (I.e. that would cause the plugin to break)
Thanks again for sharing with the plugin community.
-Mattie
Mattie is offline
Sekkusu
Junior Member
Join Date: Dec 2004
Old 02-24-2005 , 13:29  
#5

I doubt that this will break any time in the near future because the CBaseEntity and CBaseCombatCharacter class functions are not necessarily the most specific classes, so whenever there is an update it will probably be a bug fix or for efficiency, and will probably not modify the core workings of this. I think it would be unnecessary for Valve to change the core workings of these classes because they work fine as they are now, and when features are added to CS:S, they will probably only add new code and not modify to heavily these two classes other than by adding functions.

I also don't think that there will ever be a permanent break in the CBase* classes due to the reasons listed above. The only problems that may be encountered is that the functions will change slightly which will only need a minor fix as opposed to a complete workaround.

Rebell: The plugin is more of an example of how to change models and how to use the CBase* classes as opposed to a plugin that is ready for distribution as is. To use it simply type !disguise or !enemyspawn in the developer's console with the plugin running (any player can do this if they know the name of the commands) and the command will execute.
Sekkusu is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 02-24-2005 , 13:32  
#6

Sekkusu,

Thanks for the quick response. Did you have any comment on the following two questions I asked above?

Quote:
  • 1. Can you post this over in hl2coding.com's Server Plugins section? This is good stuff for those learning in that forum.

    2. I believe I read in the hlcoder's mailing list that you were having problems getting your plugin to load when you used certain functions from (I believe) CBaseCombatWeapon. I know this example is for CBaseEntity/CombatCharacter, but (a) did you have similar problems with any methods of these two classes and (b) do you have a list of the problems you had with CBaseCombatWeapon?
-Mattie
Mattie is offline
Sekkusu
Junior Member
Join Date: Dec 2004
Old 02-24-2005 , 13:37  
#7

I posted it over at HL2Coding.

For the CBCC errors, I still haven't sorted it all out. I've ran into random functions that will cause the plugin not to load all over the SDK, so I'm not sure why it isn't working and such. For CBCC so far I haven't been able to GetActiveWeapon() or do much of anything with the Weapons system, but I might just be missing something.

There's some things that don't work but don't let that discourage you from messing around with it, because there's alot that does work and it's fun playing around with what you can do.
Sekkusu is offline
Cr3V3TT3
Senior Member
Join Date: Jul 2004
Location: V'dauban
Old 03-13-2005 , 16:10  
#8

I' m using your concept for my new plugin and i have got some problems :
To corect problems i done :

Code:
IGameEventManager *gameeventmanager = NULL;
to
Code:
IGameEventManager2 *gameeventmanager = NULL;
IGameEventListener2 *listener = NULL;
--------------------------
Code:
gameeventmanager->AddListener( this, true );
to
Code:
gameeventmanager->AddListener( listener, "player_death",true );
gameeventmanager->AddListener( listener, "player_hurt",true );
ect...
--------------------------
Code:
gameeventmanager->RemoveListener( this );
to
Code:
gameeventmanager->RemoveListener( listener );

*Maybe i said only stupid things* so don' t listen to me
Cr3V3TT3 is offline
Send a message via MSN to Cr3V3TT3
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 03-24-2005 , 15:23  
#9

They're morons over at hl2coding though - God forbid you do somthing Valve doesn't expressly say you may

Why are you using an offset :/
__________________
Avoid like the plague.
vancelorgin is offline
Cr3V3TT3
Senior Member
Join Date: Jul 2004
Location: V'dauban
Old 03-24-2005 , 15:39  
#10

Quote:
Originally Posted by vancelorgin
They're morons over at hl2coding though - God forbid you do somthing Valve doesn't expressly say you may

Why are you using an offset :/
Hmm if you talking to me, i have a simple answer : i' m a noob ^^
Cr3V3TT3 is offline
Send a message via MSN to Cr3V3TT3
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode