Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [Release] Overwrite Default Class (GSC)

[Release] Overwrite Default Class (GSC)

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
26 Posts 8 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    Kalitos
    replied to Cahz on Apr 5, 2020, 4:17 PM last edited by Kalitos Apr 5, 2020, 7:18 PM
    #12

    Cahz I thought so too. Still there is a latent problem, if within the 10 seconds that the player is given, use a grenade or shoot that, they must also block the class change.

    undefined 1 Reply Last reply Apr 5, 2020, 4:32 PM
    0
    • undefined Offline
      undefined Offline
      Cahz VIP
      replied to Kalitos on Apr 5, 2020, 4:32 PM last edited by
      #13

      Kalitos you can easily add another function that checks if the weapon has been fired and if it has, to change self.StopClassChange to true . I'm sure that there is also another function to check if a grenade/stun has been thrown. But I personally dont need this type of script setup myself. So im not going to take the time to make it... Just recommend how it could be done

      undefined 1 Reply Last reply Apr 5, 2020, 4:57 PM
      0
      • undefined Offline
        undefined Offline
        Kalitos
        replied to Cahz on Apr 5, 2020, 4:57 PM last edited by Kalitos Apr 5, 2020, 7:58 PM
        #14

        Cahz Thanks for your help, searching google I found what I needed, the 2 things in one.

        if ( level.inGracePeriod && !self.hasDoneCombat ) // used weapons check?
        		{
        			self maps\mp\gametypes\_class::setClass( self.pers["class"] );
        			self.tag_stowed_back = undefined;
        			self.tag_stowed_hip = undefined;
        			self maps\mp\gametypes\_class::giveLoadout( self.pers["team"], self.pers["class"] );
        		}
        		else
        		{
        			self iPrintLnBold( game["strings"]["change_class"] );
        		}
        

        With this I solved it.

        undefined undefined 2 Replies Last reply Apr 5, 2020, 5:01 PM
        0
        • undefined Offline
          undefined Offline
          Cahz VIP
          replied to Kalitos on Apr 5, 2020, 5:01 PM last edited by
          #15

          Kalitos there we go. I was looking for the level.inGracePeriod yesterday and couldn't find it! Thanks for sharing your find

          undefined 3 Replies Last reply Jun 12, 2020, 6:29 PM
          1
          • undefined Offline
            undefined Offline
            alejandrodarz
            replied to Kalitos on Jun 12, 2020, 5:26 AM last edited by
            #16

            Kalitos where I put the level.inGracePeriod, that is to say where in the script?

            1 Reply Last reply
            0
            • undefined Offline
              undefined Offline
              alejandrodarz
              replied to Cahz on Jun 12, 2020, 6:29 PM last edited by
              #17

              Cahz where I put the level.inGracePeriod, that is to say where in the script?

              1 Reply Last reply
              0
              • undefined Offline
                undefined Offline
                alejandrodarz
                replied to Cahz on Jun 12, 2020, 6:32 PM last edited by
                #18

                Cahz Where do I put the code that Karlitos mentioned so that if he shoots in the 10 seconds he can't change class?

                undefined 1 Reply Last reply Jun 12, 2020, 7:07 PM
                0
                • undefined Offline
                  undefined Offline
                  alejandrodarz
                  replied to Cahz on Jun 12, 2020, 6:41 PM last edited by
                  #19
                  This post is deleted!
                  undefined 1 Reply Last reply Jun 12, 2020, 6:48 PM
                  0
                  • undefined Offline
                    undefined Offline
                    Infamous
                    replied to alejandrodarz on Jun 12, 2020, 6:48 PM last edited by
                    #20

                    alejandrodarz Stop spamming him for an answer. He'll answer when he does.

                    1 Reply Last reply
                    1
                    • undefined Offline
                      undefined Offline
                      Cahz VIP
                      replied to alejandrodarz on Jun 12, 2020, 7:07 PM last edited by Cahz Jun 12, 2020, 10:07 PM
                      #21

                      alejandrodarz Replace the old doChangeClass() function with this one

                      doChangeClass()
                      {
                         	self endon("disconnect");
                      	for(;;)
                      	{
                      		self waittill("changed_class");
                      		if ( level.inGracePeriod && !self.hasDoneCombat )
                      		{
                      			if(self.pers[ "class" ] == "CLASS_SMG")
                      			{
                      				self.pers[ "class" ] = undefined;
                      				self maps/mp/gametypes/_class::giveloadout( self.team, self.class );
                      				self thread doRandomClass();
                      				self.RandomClass = true;
                      			}
                      			else
                      			{
                      				self.pers[ "class" ] = undefined;
                      				self maps/mp/gametypes/_class::giveloadout( self.team, self.class );
                      				self.RandomClass = undefined;
                      			}
                      		}
                      		else
                      		{
                      			self iPrintLnBold( game["strings"]["change_class"] );
                      		}
                      	}
                      }
                      
                      undefined 3 Replies Last reply Jun 12, 2020, 7:26 PM
                      1
                      • undefined Offline
                        undefined Offline
                        alejandrodarz
                        replied to Cahz on Jun 12, 2020, 7:26 PM last edited by
                        #22
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • undefined Offline
                          undefined Offline
                          alejandrodarz
                          replied to Cahz on Jun 12, 2020, 8:21 PM last edited by
                          #23

                          Cahz I found a problem and that is that when I choose a personalized class I appear with the random weapons plus the personalized weapons of mine, that is to say a total of 4 weapons and I have to commit suicide so that only my personalized weapons come out and if I commit suicide again my personalized weapons will come out more the ramdon weapons and so on

                          1 Reply Last reply
                          0
                          • undefined Offline
                            undefined Offline
                            alejandrodarz
                            replied to Cahz on Jun 12, 2020, 9:14 PM last edited by
                            #24

                            Cahz I found another error and that is that when I disconnect and go back in, the script stops serving, that is, it does not give me the ramdon weapons but those of the normal class. Any solution that you can suggest for it?

                            undefined 1 Reply Last reply Jun 12, 2020, 9:44 PM
                            0
                            • undefined Offline
                              undefined Offline
                              Cahz VIP
                              replied to alejandrodarz on Jun 12, 2020, 9:44 PM last edited by
                              #25

                              alejandrodarz Make sure you have ALL the scripts from the original post in this tread. Sounds like you deleted code.

                              undefined 1 Reply Last reply Jun 12, 2020, 9:59 PM
                              0
                              • undefined Offline
                                undefined Offline
                                alejandrodarz
                                replied to Cahz on Jun 12, 2020, 9:59 PM last edited by
                                #26

                                Cahz okok now I try it again and I tell you, that is, the script should still work when you leave the game and enter? what I should dd copy something wrong

                                1 Reply Last reply
                                0

                                • 1
                                • 2
                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Donate