• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Request] Disabling Custom Classes NOT CHOOSE CLASS
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.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]

self [[level.class]](response);

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.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
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 )
C++/Obj-C developer. Neko engine wip
Steam: Click
Thanks will check.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Couldn't find beginClassChoose in any GSC
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
(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:

            if(isSubStr(response, "custom")) {
                self iprintlnBold("You have to choose a ^3default class!");
                wait 1.0;
                self openpopupMenu( game["menu_changeclass"] );
            //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);
[Image: lxkf2.jpg]

Possibly Related Threads…
Thread Author Replies Views Last Post
  Black Ops 2 Custom background? jotape99 10 7,073 10-29-2013, 07:22
Last Post: xInfinity.
  [Release] TeamCounter class 8q4s8 3 3,617 10-15-2013, 18:14
Last Post: [HARD] Tony.
  Help choose 2 random players?(1 each team) 26hz 6 2,562 09-12-2013, 17:32
Last Post: Yamato
  Custom xanims DidUknowiPwn 8 3,928 08-28-2013, 08:17
Last Post: RaZ
  Help Make ac130 shoot custom bullets Ra3shed 0 1,509 07-23-2013, 13:02
Last Post: Ra3shed
  [Tutorial] Custom gametype HUD iAegle 17 9,192 07-14-2013, 01:16
Last Post: Nekochan
Video Custom Facepaints? Cuddlyedits 5 2,157 07-01-2013, 14:58
Last Post: iPaddie
  [Release] 15 classes in MW3 OrangePL 14 10,813 06-28-2013, 19:14
Last Post: X-Track
  Help dedicated servers and custom dvars mattyman 0 1,450 06-22-2013, 07:33
Last Post: mattyman
Information [Tutorial] Adding DLC Maps as Custom Maps. Nekochan 151 66,875 05-25-2013, 01:05
Last Post: Nero Z zero

Forum Jump:

Users browsing this thread: 1 Guest(s)