Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request Disabling Custom Classes NOT CHOOSE CLASS
#1
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]
Reply

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

A casual conversation between barata and I about Nukem.
Reply

#3
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-Cdeveloper. Neko engine wip
Steam: Click
Reply

#4
Thanks will check.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#5
Couldn't find beginClassChoose in any GSC
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#6
(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);
[Image: lxkf2.jpg]
Reply



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

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.