Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. How to get the round number in SyD !Help

How to get the round number in SyD !Help

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
9 Posts 4 Posters 724 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.
  • Kalitosundefined Offline
    Kalitosundefined Offline
    Kalitos
    wrote on last edited by Kalitos
    #1

    Can someone help me how I get the round number in SyD mode, I ask it to know what round I am in when I reappear and from there execute certain code in a certain round.

    I have the following code:

    onPlayerSpawned()
    {
        self endon("disconnect");
    	level endon("game_ended");	
        for(;;)
        {
        	self waittill("spawned_player");    
        	if(!isDefined(self.isFirstSpawn))
    		{
    			self.isFirstSpawn = true;
    			self iprintln("^5Black Ops 2 - Script ^7| ^5Weapons ^7and ^5attachments ^7restriction ^5| ^7By: ^2Kalitos"); 
            	WelcomeMessage("^5Welcome ^7To ^2Maniacos ^7Server");
    		}                   
                   //Other code
    	}
    }
    

    What I want is that it only appears once, I tried it in TDM mode and it works, but in SYD mode it doesn't work, because I think that in each round it takes it as if it were its first appearance.

    alejandrodarzundefined 1 Reply Last reply
    0
    • Mr. Androidundefined Offline
      Mr. Androidundefined Offline
      Mr. Android
      Plutonium Admin
      wrote on last edited by Mr. Android
      #2

      Your post is very hard to understand, it might be best to re-word it.

      Edit: Much better, I hope you get the help you need.

      Kalitosundefined 1 Reply Last reply
      0
      • Mr. Androidundefined Mr. Android

        Your post is very hard to understand, it might be best to re-word it.

        Edit: Much better, I hope you get the help you need.

        Kalitosundefined Offline
        Kalitosundefined Offline
        Kalitos
        wrote on last edited by
        #3

        @Mr-Android 😞

        1 Reply Last reply
        0
        • Sorexundefined Offline
          Sorexundefined Offline
          Sorex
          Contributor
          wrote on last edited by Sorex
          #4

          Kalitos For serch and destroy u can use the teams score to see wich round is, i use this system on to make mapvote working only for the last raund

          Kalitosundefined 1 Reply Last reply
          0
          • Sorexundefined Sorex

            Kalitos For serch and destroy u can use the teams score to see wich round is, i use this system on to make mapvote working only for the last raund

            Kalitosundefined Offline
            Kalitosundefined Offline
            Kalitos
            wrote on last edited by
            #5

            Sorex Can you do an example in code?

            1 Reply Last reply
            0
            • Sorexundefined Offline
              Sorexundefined Offline
              Sorex
              Contributor
              wrote on last edited by
              #6

              You can use

              [[level._getteamscore]]( "teamname" )
              

              where team naem can be axis or allies

              Kalitosundefined 1 Reply Last reply
              0
              • Sorexundefined Sorex

                You can use

                [[level._getteamscore]]( "teamname" )
                

                where team naem can be axis or allies

                Kalitosundefined Offline
                Kalitosundefined Offline
                Kalitos
                wrote on last edited by
                #7

                Sorex I was thinking about it, and if I implement it as you recommend, it would not achieve what I need, since if I connect in round 3 and it is my first appearance, I would not receive the welcome message.

                1 Reply Last reply
                0
                • Sorexundefined Offline
                  Sorexundefined Offline
                  Sorex
                  Contributor
                  wrote on last edited by
                  #8

                  Kalitos u need to use some math, for every round ended thera a winner to know if is ther third round make the sum betwen axis score and allias score, i used a different solution to make mapvote working only on last round. With this u can semplified your job

                  1 Reply Last reply
                  0
                  • Kalitosundefined Kalitos

                    Can someone help me how I get the round number in SyD mode, I ask it to know what round I am in when I reappear and from there execute certain code in a certain round.

                    I have the following code:

                    onPlayerSpawned()
                    {
                        self endon("disconnect");
                    	level endon("game_ended");	
                        for(;;)
                        {
                        	self waittill("spawned_player");    
                        	if(!isDefined(self.isFirstSpawn))
                    		{
                    			self.isFirstSpawn = true;
                    			self iprintln("^5Black Ops 2 - Script ^7| ^5Weapons ^7and ^5attachments ^7restriction ^5| ^7By: ^2Kalitos"); 
                            	WelcomeMessage("^5Welcome ^7To ^2Maniacos ^7Server");
                    		}                   
                                   //Other code
                    	}
                    }
                    

                    What I want is that it only appears once, I tried it in TDM mode and it works, but in SYD mode it doesn't work, because I think that in each round it takes it as if it were its first appearance.

                    alejandrodarzundefined Offline
                    alejandrodarzundefined Offline
                    alejandrodarz
                    wrote on last edited by
                    #9

                    Kalitos

                    currentround = game["roundsplayed"]+1;

                    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


                    • Login

                    • Don't have an account? Register

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