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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. [Support] Server Side Support

[Support] Server Side Support

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
38 Posts 4 Posters 935 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.
  • TheHiddenHourundefined Offline
    TheHiddenHourundefined Offline
    TheHiddenHour Contributor
    replied to Farzad on last edited by
    #2

    Farzad maps/mp/teams/_teams::changeteam(team) can change a players team. Try putting it in your onPlayerSpawned() with the team parameter set to "axis".

    Farzadundefined 4 Replies Last reply
    0
    • Farzadundefined Offline
      Farzadundefined Offline
      Farzad
      replied to TheHiddenHour on last edited by
      #3
      This post is deleted!
      1 Reply Last reply
      0
      • Farzadundefined Offline
        Farzadundefined Offline
        Farzad
        replied to TheHiddenHour on last edited by Farzad
        #4

        TheHiddenHour I didn’t input it under for( 😉)
        but I have a question, will this mean any players who connect will auto come to my teams Axis? In other words, SDC is the team name I believe for carrier? Or no?

        1 Reply Last reply
        0
        • Farzadundefined Offline
          Farzadundefined Offline
          Farzad
          replied to TheHiddenHour on last edited by
          #5

          TheHiddenHour I received a syntax error, I’m assuming it’s the missing semi colon at the end of ) or no?

          1 Reply Last reply
          0
          • Farzadundefined Offline
            Farzadundefined Offline
            Farzad
            replied to TheHiddenHour on last edited by
            #6

            TheHiddenHour so the problem is for my server is have a bot spawn in self threaded on player spawned so like
            doBots(a)
            {
            for(i=0; i < a; i++)
            {
            self thread maps\mp\bots_bot::spawn_bot(“allies”)

            so the first round starts fine the bot spawns in normal but the next round the bot comes on my team not spawned in with 0 deaths but the first one I think it works because I’m on SDC because I put axis in the parameter, but the next round the bot is on my team not spawned in with 0 deaths even though I killed him last round, how man?

            TheHiddenHourundefined 1 Reply Last reply
            0
            • TheHiddenHourundefined Offline
              TheHiddenHourundefined Offline
              TheHiddenHour Contributor
              replied to Farzad on last edited by
              #7

              Farzad Mate, I have absolutely no clue what the hell what you're trying to explain to me lmao. Anyways, I've given you the function name to change a players team. The logic for when to do it and such is going to be up to you.

              Farzadundefined 2 Replies Last reply
              0
              • Farzadundefined Offline
                Farzadundefined Offline
                Farzad
                replied to TheHiddenHour on last edited by
                #8

                TheHiddenHour okay well how come for some odd reason the next round the bot is not spawned in and is in my team? But the first round it’s all well

                TheHiddenHourundefined 1 Reply Last reply
                0
                • Farzadundefined Offline
                  Farzadundefined Offline
                  Farzad
                  replied to TheHiddenHour on last edited by Farzad
                  #9

                  TheHiddenHour I mean I would give you the compiled gsc to test it, but according to the discord image you sent regarding your PC specs, it ain’t lookin you finna hop on bo2 ma baby, but I just need help man plz 🙏🏼

                  1 Reply Last reply
                  0
                  • TheHiddenHourundefined Offline
                    TheHiddenHourundefined Offline
                    TheHiddenHour Contributor
                    replied to Farzad on last edited by
                    #10

                    Farzad said in Server Side Support:

                    TheHiddenHour okay well how come for some odd reason the next round the bot is not spawned in and is in my team? But the first round it’s all well

                    Farzad said in Server Side Support:

                    TheHiddenHour I mean I would give you the compiled gsc to test it, but according to the discord image you sent regarding your PC specs, it ain’t lookin you finna hop on bo2 ma baby, but I just need help man plz 🙏🏼

                    I'm not sure why the bot switches teams, but you can do a check to see how many bots are on a team and then kick them accordingly to keep the teams balanced.

                    Farzadundefined 2 Replies Last reply
                    0
                    • Farzadundefined Offline
                      Farzadundefined Offline
                      Farzad
                      replied to TheHiddenHour on last edited by Farzad
                      #11

                      TheHiddenHour please don’t mate me on this, but could you from the top of your head, just write a quick check, I do have a check of only 1 bot spawning in for the whole SnD game, but just after the next round he comes on my team not spawned it, im not basing my issue off bot count, the line you sent me works, but only for the first round, why is that? May you please like let me know, thanks man 🙏🏼

                      1 Reply Last reply
                      0
                      • Farzadundefined Offline
                        Farzadundefined Offline
                        Farzad
                        replied to TheHiddenHour on last edited by Farzad
                        #12

                        TheHiddenHour basically when the game starts I’m obviously on one team and he’s on another, to the players that join, how would I make them come to my team automatically? Using your line, it bugged out I guess next round, the first round started and I was on axis and he was on allies, but the next round he came to axis (my team) with 0 deaths and wasn’t spawned in, even though I did kill him last round, so what’s restarting in my script then? Do I need something called Waittill or something or no? Sorry for the spam I just need to fix this issue ASAP 🤷🏻‍♂️

                        Farzadundefined 1 Reply Last reply
                        0
                        • Farzadundefined Offline
                          Farzadundefined Offline
                          Farzad
                          replied to Farzad on last edited by
                          #13

                          Farzad I’m waiting for one of those admins to come in randomly with the whole function done 😂, I wish I’m that person that it happens to, TheHiddenHour not saying anything wrong by the way

                          TheHiddenHourundefined 1 Reply Last reply
                          0
                          • TheHiddenHourundefined Offline
                            TheHiddenHourundefined Offline
                            TheHiddenHour Contributor
                            replied to Farzad on last edited by TheHiddenHour
                            #14

                            Farzad I'm playing some Warzone with my buds rn, sorry chief lol. I hope that admin comes soon though 👍 .

                            EDIT: I can write this for you though.

                            getTeamCount(team) {
                            	count = 0;
                            	foreach(player in level.players) {
                            		if(player.team == team) {
                            			count++;
                            		}
                            	}
                            	
                            	return count;
                            }
                            
                            Farzadundefined 3 Replies Last reply
                            0
                            • Farzadundefined Offline
                              Farzadundefined Offline
                              Farzad
                              replied to TheHiddenHour on last edited by
                              #15

                              TheHiddenHour could you explain what this for me? I don’t see a word like Allies or Axis so I’m assuming I need to add some
                              Stuff to the function, or is it already complete but I have to add the first line you sent me from the begging of this post followed up with that? Do I call anything? I’m sorry I’m not an expert at this..

                              1 Reply Last reply
                              0
                              • Farzadundefined Offline
                                Farzadundefined Offline
                                Farzad
                                replied to TheHiddenHour on last edited by
                                #16

                                TheHiddenHour is this function tied with
                                maps/mp/teams/_teams::changeteam(team)
                                or is it not? Because I ask this because it says teams here and in the function it says Team without an S so like I’m confused on what to paste with the stuff you gave me sorry man

                                1 Reply Last reply
                                0
                                • Farzadundefined Offline
                                  Farzadundefined Offline
                                  Farzad
                                  replied to TheHiddenHour on last edited by
                                  #17

                                  TheHiddenHour the line you provided and this function working but like man for some problem the Next Round Of The Game the bot just comes on us team and he isn’t spawned in, that’s all that the issue is, I know you wrote this function and are busy with a war zone match, hence it will take a bit of time for an answer, but please let me know what the best possible solution as I’ve been online all day looking on forums and sources and going inside the functions and not finding what I want, thanks man 👑

                                  TheHiddenHourundefined 1 Reply Last reply
                                  0
                                  • TheHiddenHourundefined Offline
                                    TheHiddenHourundefined Offline
                                    TheHiddenHour Contributor
                                    replied to Farzad on last edited by
                                    #18

                                    Farzad You're going to need to know some scripting knowledge mate. I've given you the means to switch a players team and get the amount of players on a team, now you need to write the logic. I'll even write you a function real quick that can kick players:

                                    kickPlayer() {
                                    	ent_num = self getEntityNumber();
                                    	kick(ent_num);
                                    }
                                    

                                    You can call it like self kickPlayer(); // Will kick the player who called the function
                                    I won't be writing something that you can C+P as that'd take a while. Hopefully a mod or someone else will help flesh it out for you.

                                    Farzadundefined 1 Reply Last reply
                                    0
                                    • Farzadundefined Offline
                                      Farzadundefined Offline
                                      Farzad
                                      replied to TheHiddenHour on last edited by
                                      #19

                                      TheHiddenHour okay okay, but but why would I need to kick someone? I don’t have an issue with bot spawn in. Dude, the line works, the bot spawns in on the other team and all 5 of us spawn in on one team, not the bots team, but why next round the BOT comes to our team and isn’t spawned in? How is this kick function going to help?

                                      TheHiddenHourundefined 1 Reply Last reply
                                      0
                                      • TheHiddenHourundefined Offline
                                        TheHiddenHourundefined Offline
                                        TheHiddenHour Contributor
                                        replied to Farzad on last edited by
                                        #20

                                        Farzad So you can kick the bot and spawn another one in. Again, no clue why it doesn't spawn in.

                                        Farzadundefined 1 Reply Last reply
                                        0
                                        • Farzadundefined Offline
                                          Farzadundefined Offline
                                          Farzad
                                          replied to TheHiddenHour on last edited by
                                          #21

                                          TheHiddenHour so, what else would I be missing apart from these?

                                          TheHiddenHourundefined 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