PDA

View Full Version : Name variable for team limiting?


Lula
12-06-2003, 12:48 AM
I currently run a 32 man server for my unit. The one bg problem we have had in the past is team leveling. This has been temporarily fixed by installing MPowell1944's team limiting mod. However members of my allied basedunit are always being assigned to the axis side, this is causing alot of them to become angry. So far I have created the code that will allow those with our specific tag in their names have unrestricted team switching. However, i cannot get it to work as I cannot find the name command that cals the players name, I have found self.name but cannot remeber the wildcard character that allows just that segment be recognized as correct.

Here is a sample of my code for the name call. I still require the wildcard in order for the tag to be recognized.


if (self.name == "[3rd ID]")
{
response = "allies";
player iprintln("[3rd ID] Member moved to allies.");
}


Any help would be greatly appreciated. Thanks in advanced.

rudedog
12-06-2003, 04:54 PM
Wish I could help. Try asking over at TMT. Thier link is below

http://www.modtheater.com/

Lula
12-06-2003, 07:17 PM
Couldnt find anything other the than the cvars I have tired already. Thanks for the link though.

One more question, is there a wild card that i can use so it takes just that segment but will fill in spaces? ie. If I have it set to if(self.name == "*.[3rd ID]"); the *. is the wildcard. Isd there anything like that for this?

Hammer
12-06-2003, 07:36 PM
No such pattern matching is available, it has to be scripted. In CoDaM's Utilities module, I've got a string search function that can be used to match any part of a string. See the CoDaM forum over at http://cod.mcgamers.com/

Lula
12-07-2003, 12:04 AM
Thanks Hammer.

*edit* I'm completely confused by this CoDAM system. I having the damndest time trying to find the string segment utility you were talking about.