Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

You are here: Big Brother Bot ForumAdd-OnsPlugins DiscussionPlugins by xlr8or (Moderator: Freelander)PowerAdmin with Custom Gametypes (CoD2)
Pages: [1]   Go Down
  Print  
Author Topic: PowerAdmin with Custom Gametypes (CoD2)  (Read 3292 times) Bookmark and Share
Hoody
Guest
« on: January 20, 2007, 05:52:45 PM »

Hey XLR

Firstly, Great work with the PowerAdmin Mod, its really helped us move AFK's to spec, blowing up people in glicthes, ect. But unfortunately the plugin doesnt appear to work with custom gametypes. I believe this is due to the ".gsc" file that goes with a gametype. Eg. "tdm.gsc" Which contains the gametype information AND B3.

I cant seem to find what needs to go where to make b3 work with it though :S

Currently the only gametype that i'm trying to do is HTF (Hold the Flag)

This is whats currently displayed in the FS game folder.. It would be appreciated if you could edit it, or tell me what needs to go where for future refrence.

http://www.am-clan.com/cod2/main/htf.gsc

Is the file in question, wouldnt fit in here.


Many Thanks XLR, Keep up the great work!
Logged

[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2022
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #1 on: January 21, 2007, 02:07:07 AM »

It's very easy to add the poweradmin stuff to custom gametypes, you just need to know how to edit the <gametype>.gsc file

Open the custom gametype .gsc (like htf.gsc) with an editor. Look for the first function called main(), in htf.gsc it looks like this:
Quote
main()
{
   level.callbackStartGameType = ::Callback_StartGameType;
   level.callbackPlayerConnect = ::Callback_PlayerConnect;
   level.callbackPlayerDisconnect = ::Callback_PlayerDisconnect;
   level.callbackPlayerDamage = ::Callback_PlayerDamage;
   level.callbackPlayerKilled = ::Callback_PlayerKilled;
   maps\mp\gametypes\_callbacksetup::SetupCallbacks();

   level.autoassign = ::menuAutoAssign;
   level.allies = ::menuAllies;
   level.axis = ::menuAxis;
   level.spectator = ::menuSpectator;
   level.weapon = ::menuWeapon;
   level.endgameconfirmed = ::endMap;
}

Add a startup line for the poweradmin mod in this section so it looks like this:
Quote
main()
{
   level.callbackStartGameType = ::Callback_StartGameType;
   level.callbackPlayerConnect = ::Callback_PlayerConnect;
   level.callbackPlayerDisconnect = ::Callback_PlayerDisconnect;
   level.callbackPlayerDamage = ::Callback_PlayerDamage;
   level.callbackPlayerKilled = ::Callback_PlayerKilled;
   maps\mp\gametypes\_callbacksetup::SetupCallbacks();

   // B3 admintools
   thread b3\_b3_main::Init();

   level.autoassign = ::menuAutoAssign;
   level.allies = ::menuAllies;
   level.axis = ::menuAxis;
   level.spectator = ::menuSpectator;
   level.weapon = ::menuWeapon;
   level.endgameconfirmed = ::endMap;
}

Save it and that's all you need to do...
Logged

Hoody
Guest
« Reply #2 on: January 21, 2007, 04:23:44 AM »

lol.. i'm embarassed at how easy that was... ah well.. Good for future refrence Cheesy
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal