Skip to content
  • 0 Unread 0
  • 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 5.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • alejandrodarz alejandrodarz

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

    Cahz Offline
    Cahz Offline
    Cahz
    VIP
    wrote on last edited by Cahz
    #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"] );
    		}
    	}
    }
    
    alejandrodarz 3 Replies Last reply
    1
    • Cahz Cahz

      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"] );
      		}
      	}
      }
      
      alejandrodarz Offline
      alejandrodarz Offline
      alejandrodarz
      wrote on last edited by
      #22
      This post is deleted!
      1 Reply Last reply
      0
      • Cahz Cahz

        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"] );
        		}
        	}
        }
        
        alejandrodarz Offline
        alejandrodarz Offline
        alejandrodarz
        wrote on 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
        • Cahz Cahz

          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"] );
          		}
          	}
          }
          
          alejandrodarz Offline
          alejandrodarz Offline
          alejandrodarz
          wrote on 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?

          Cahz 1 Reply Last reply
          0
          • alejandrodarz alejandrodarz

            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?

            Cahz Offline
            Cahz Offline
            Cahz
            VIP
            wrote on last edited by
            #25

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

            alejandrodarz 1 Reply Last reply
            0
            • Cahz Cahz

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

              alejandrodarz Offline
              alejandrodarz Offline
              alejandrodarz
              wrote on 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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • 1
              • 2
              • Login

              • Don't have an account? Register

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