Raised This Month: $ Target: $400
 0% 

Make a void work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drocona
Junior Member
Join Date: Oct 2005
Location: The Netherlands
Old 01-29-2006 , 06:18   Make a void work
Reply With Quote #1

Ok so i added a void to my server plugin only thing now...

how do i make it work lol, i think i need some line so the server wil actually execute it on startup..

because it just skips the whole void, the rest works fine

its like:
Code:
void bleh()
{
codehere
}
__________________
Team .Mystic - Drocona
Drocona is offline
Send a message via MSN to Drocona
[email protected]
Member
Join Date: Dec 2005
Old 01-29-2006 , 09:11  
Reply With Quote #2

Ohhh man, where to start.

Well, your plugin gets loaded by ther server.dll or server_i486.so, and the server communicates to your plugin through functions it exports, namely the IServerPluginCallbacks functions. Those are the ONLY functions that will be called by the game. Any other function you want called has to be called from one of those, and depending when you want it called is where you have it called from. The IGameEventListener/IGameEventListener2 virtual function (FireGameEvent) can also be called from the server, but only if you register your plugin to listen for events. I suggest that as a starting point, look at the serverplugin_sample and see how those functions work, and play around with adding stuff here and there to see what happens.
Lojo.jacob@gmail.com is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 01-29-2006 , 14:53  
Reply With Quote #3

I would suggest a starting point a little farther back. Something like this.

You really need to learn the basics of C++ before you start writing plugins. Learn what a function is. Learn why you use void when you declare a function. Learn what pointers are. Etc. Etc. Etc.
L. Duke is offline
Drocona
Junior Member
Join Date: Oct 2005
Location: The Netherlands
Old 01-29-2006 , 16:41  
Reply With Quote #4

well i basicly have a full working plugin already, just never got into this whole new additional void

I'll check all the functions and see what will be a good spot to load it in, thanks for helping out.

doin server plugins is just SO different than C++ in a certain way that is

well for now i'll try get it to work on the firegame event since 25% of my plugin is based on those so, should be nice point to start

thanks

i'll let you know if i get it working lol
__________________
Team .Mystic - Drocona
Drocona is offline
Send a message via MSN to Drocona
Reply



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 21:30.


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