GoldenEye: Source Forums

Debriefing => Questions, Help, & How To's => Topic started by: WilliamSlapner on December 06, 2010, 08:48:20 am

Title: Question:About characters
Post by: WilliamSlapner on December 06, 2010, 08:48:20 am
Is there a command to put in a server.cfg that limits what character model players can choose?
Title: Re: Question:About characters
Post by: major on December 06, 2010, 09:10:42 am
No, there is no current command that will. You might be able to work up a server plugin(like sourcemod) to do it, but that might take some work.

Might be able to mod around a TF2 character sourcemod plugin, but I've never seen, nor done it.
Title: Re: Question:About characters
Post by: WilliamSlapner on December 06, 2010, 09:24:09 am
K thank you, my William Slapner Gamemode will not be happening soon.
Title: Re: Question:About characters
Post by: major on December 06, 2010, 09:59:23 am
Well you might be able to limit that via gamemode. If your making a custom one, I think it might be doable.

I think KM, or another proficient python coder might be able to shed some light. They should post back within 24hours.
Title: Re: Question:About characters
Post by: killermonkey on December 06, 2010, 11:08:52 pm
Look at scripts/python/GamePlay/liveandletdie.py .... specifically def CanPlayerChangeChar(self, player, ident):

Basically you can restrict character selections this way in Python. Return True to let them be that character, or False to deny it.

I wouldn't bother writing a python script right now. v4.1 introduced a slew of changes to Python that will break your gamemode. More information will be posted later but for now here is the Python changelog for v4.1: http://wiki.goldeneyesource.net/index.php/V4.1_Changelist#Python