Raised This Month: $32 Target: $400
 8% 

WarriorMod: Clanwar manager - advice & Beta testers requ


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 04-17-2006 , 11:30   WarriorMod: Clanwar manager - advice & Beta testers requ
Reply With Quote #1

Hi,

I'm currently working on a ClanWar manager tool I named WarriorMod, but I need some advice concerning menu manangement...

I'm trying to make a menu shown only to a specific team but found out that I have to add the players that are actually NOT in the specific team to get the message delivered to the right people.

For example:
(m_TeamToSayStayLeave was set to the team's ID (2 or 3) which won knife round before.)
Code:
CRFGeneral* rf = new CRFGeneral();
FOREACHVALIDPLAYER(i)
	if( m_playerInfo[i] -> GetTeamIndex() == m_TeamToSayStayLeave )
		rf -> AddPlayer(i);
ClassicMenu(rf, allowedkeys, -1, menubody.str().c_str());
this does not work, only ppl that I do not want to get the menu will get it. I have to do:
Code:
CRFGeneral* rf = new CRFGeneral();
FOREACHVALIDPLAYER(i)
	if( m_playerInfo[i] -> GetTeamIndex() != m_TeamToSayStayLeave )
		rf -> AddPlayer(i);
ClassicMenu(rf, allowedkeys, -1, menubody.str().c_str());
this way, the team that actually won the knife round will get the message and be allowed to select stay/leave in the menu. Why is that?


Furthermore, I'd appreciate if someone would help me beta testing. I've compiled a debug version which has a few more commands than the release compiles, you can find out which by typing
Code:
find war_
into server console. All commands have a short help description, so you should see what they do.
The command war_maxplayers sets the internal maxplayers value to 20, so you don't have to restart the server everytime you reloaded the plugin.
Please let me know if you find any bugs!

ThanxXx in advance for all advice and test reports!

Greetz MGee


Please go to http://warriormod.extreme-gaming-clan.de for download
MistaGee is offline
Send a message via ICQ to MistaGee
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-17-2006 , 11:34  
Reply With Quote #2

After skimming your post I have come up with a simple idea.

Had it ever crossed your mind your own Team ID's are backwards :\ ?
Maybe you are setting the loosing team as the winning team?

Because, if you read what you typed yourself, the same code works fine for everything else.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 04-17-2006 , 11:38  
Reply With Quote #3

I've got:
Code:
#define TEAM_NONE 0
#define TEAM_SPEC 1
#define TEAM_T    2
#define TEAM_CT   3
#define TEAMNAME( index ) ( index == 0 ? "NONE" : ( index == 1 ? "SPEC" : ( index == 2 ? "T" : "CT" ) ) )
So I guess the IDs are
SPEC 1
T 2
CT 3

is that correct?

I'm setting the winner's ID as follows:
Code:
void GeeventManager::roundEnd( int winner ){
	// quite a lot of stuff here
	if( m_KnifeRound && RDY ){
		// again a few lines...
		if(!m_TeamToSayStayLeave) m_TeamToSayStayLeave = winner;
this winner variable is read out of the event round_end, so it's given by the engine.
it is set absolutely correct, I've checked that about 500 times using a debug command that prints this variable to console... it actually worked when I waited for ppl to "say rdy", but when I started using the menu stuff it all got messy

Greetz MGee
MistaGee is offline
Send a message via ICQ to MistaGee
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 04-17-2006 , 19:37  
Reply With Quote #4

Oh, only linux. Too bad, dont have linux running atm.

Btw,
Code:
0 - unassigned
1 - spec
2 - t
3 - ct
Cheers
__________________
ichthys is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 04-18-2006 , 10:31  
Reply With Quote #5

Now I added code that prints when a menu is sent who it is sent to by printing the names of everyone listed in the RecipientFilter to server console. This is what I got:

Code:
war_list
[WAR] Displaying user list...
[WAR] Slot = 0 | UID = 2 | Team = 1 (SPEC) | Name = -[EXtreME-gAmINg]-TV @ delay 30
[WAR] Slot = 1 | UID = 13 | Team = 3 (CT) | Name = -[ExTreME-gAmINg]-MistaGee
[WAR] Slot = 2 | UID = 14 | Team = 2 (T) | Name = [-Z-] Rick
[WAR] Refreshing user list...
[WAR] Sending Menu to 1 Recipient:
Ready?
->1. Ready, go!
->0. Not ready, w8!
->
Ts are ready
CTs are not ready
->
Settings:
-> MR12
-> FTB: OFF
-> Pausable: OFF
-> Recording a demo: YES
-> Password:
Allowed Keys: 1000000001
[WAR] Recipient 0 = "[-Z-] Rick"
[WAR] UserMessage 10 = "ShowMenu"
[WAR] Sending Menu to 1 Recipient:
->
->
->
->
Ts are ready
CTs are not ready
->
Settings:
-> MR12
-> FTB: OFF
-> Pausable: OFF
-> Recording a demo: YES
-> Password:
Allowed Keys: 0000000000
[WAR] Recipient 0 = "-[ExTreME-gAmINg]-MistaGee"
[WAR] UserMessage 10 = "ShowMenu"
I actually saw a menu *wow*. But the one I got displayed was the one that was actually being sent to [-Z-] Rick Since Rick is a bot, I can't tell if he got th menu that was sent to me.
If I'm not playing a 1on1 but with multiple bots in the team, I don't get a menu at all, and I don't know who else does...

How come? Why do I get the menu that was sent to the Bot instead of the one that was actually sent to me? Do I have to work around some bug in the engine? I'm totally confused

Greetz MGee
MistaGee is offline
Send a message via ICQ to MistaGee
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 05-05-2006 , 14:33  
Reply With Quote #6

Any windows version?
tcviper is offline
Send a message via MSN to tcviper
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 05-05-2006 , 15:07  
Reply With Quote #7

the above mentioned problems are now fixed, thanks to Mani. I will soon have a place to host it on and officially release the plugin.

Since I don't know how to compile the Plugin for Windows, I haven't yet done so. As soon as I know how, I'll make a windows compile, too.

Greetz MGee
MistaGee is offline
Send a message via ICQ to MistaGee
rockstone
Junior Member
Join Date: Mar 2006
Old 05-05-2006 , 16:20  
Reply With Quote #8

Will this work on DM servers?
rockstone is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 05-05-2006 , 16:49  
Reply With Quote #9

you mean hl2dm? I can't tell since I didn't test it, but I don't see why it shouldn't... try it and let me know if it worked

Greetz MGee
MistaGee is offline
Send a message via ICQ to MistaGee
rockstone
Junior Member
Join Date: Mar 2006
Old 05-05-2006 , 16:59  
Reply With Quote #10

Quote:
Originally Posted by MistaGee
you mean hl2dm? I can't tell since I didn't test it, but I don't see why it shouldn't... try it and let me know if it worked

Greetz MGee
Is it for windows yet
I will try it if it is and let you know what goes on of course.
rockstone is offline
Reply


Thread Tools
Display Modes

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 09:39.


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