ItsMods
[Request] Disabling Custom Classes NOT CHOOSE CLASS - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Request] Disabling Custom Classes NOT CHOOSE CLASS (/Thread-Request-Disabling-Custom-Classes-NOT-CHOOSE-CLASS.html)



Disabling Custom Classes NOT CHOOSE CLASS - DidUknowiPwn - 01-08-2013

Hey guys I got a question for some of you GSC guys. I need a function/code that disables the Custom Classes not CHOOSE CLASS as in zxz's _menus.gsc (found it on mpgh, posted by @Yamato). As in Custom Class 1,2,3,4,5,etc. any ideas? (The reason being I want to use my own classtable.csv and not to be interrupted by other kids.) In MW3 there's a DVAR: pm_gamesetup_options_customclassrestrictions or something like this.


RE: Disabling Custom Classes NOT CHOOSE CLASS - master131 - 01-08-2013

_menus.gsc.

Original:
Code:
self [[level.class]](response);

New:
Code:
if(isSubStr(response, "custom")) response = "demolitions_mp,0"; self [[level.class]](response);

Will override any custom class choices, not sure if disabling them is an option.


RE: Disabling Custom Classes NOT CHOOSE CLASS - Nekochan - 01-08-2013

You need to edit _playerlogic.gsc and _menus.gsc ( or _Teams.gsc, not sure ).
There's functions before 'self notify("spawned_player");', you need to delete 'em. Then find beginClassChoose() and clear this function ( Not sure, menus,gsc or teams.gsc )


RE: Disabling Custom Classes NOT CHOOSE CLASS - DidUknowiPwn - 01-08-2013

Thanks will check.


RE: Disabling Custom Classes NOT CHOOSE CLASS - DidUknowiPwn - 01-09-2013

Couldn't find beginClassChoose in any GSC


RE: Disabling Custom Classes NOT CHOOSE CLASS - banz - 01-10-2013

(01-09-2013, 01:44)DidUknowiPwn Wrote: Couldn't find beginClassChoose in any GSC

It's beginClassChoice( forceNewChoice ) .
Function itsself is in _menus.gsc.


But i don't see how that'd help to just disable custom classes tbh.
I doubt you can avoid that they show up without access to the appropriate .menu file.

So what master suggested seems to be the best solution.
You could change it a bit though, so that the class menu re-opens when they choose a custom class. Something like this:

Code:
if(isSubStr(response, "custom")) { self iprintlnBold("You have to choose a ^3default class!"); wait 1.0; self openpopupMenu( game["menu_changeclass"] ); continue; } //doesn't matter if this part is above the response check or below, menu will close anyway as soon as a class is clicked on... self closepopupMenu(); self closeInGameMenu(); // self.selectedClass = true; self [[level.class]](response);