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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Custom Message Over Time Help

Custom Message Over Time Help

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
6 Posts 3 Posters 208 Views 1 Watching
  • 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.
  • P1P0P1undefined Offline
    P1P0P1undefined Offline
    P1P0P1
    wrote on last edited by
    #1

    Hi guys, like the title says, did anyone know a code, o the function for send messages over time?, i mean, something like over 5 minutes or 15 the server send a message giving the discord link, or the rules, and stuff like that, im just starting my own server a few days ago and idk how to put that kind of message. Thanks a lot 🐶

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

      P1P0P1
      I use a function to scroll message on top of the screen. I prefer this the normal printing on bottom left. Change the string inside the " " and ut what you want.
      call in the init level thread message_area_manager(); and thats it

      affectElement(type, time, value){
         if(type == "x" || type == "y")
             self moveOverTime(time);
         else
             self fadeOverTime(time);
         if(type == "x")
             self.x = value;
         if(type == "y")
             self.y = value;
         if(type == "alpha")
             self.alpha = value;
         if(type == "color")
             self.color = value;
      }
      
      message_area_manager(){ // Developed by DoktorSAS
         level endon("game_ended");
         level.message_area = createServerFontString("hudsmall" , 1.2);
         level.message_area setPoint("CENTER", "CENTER", -1000, 220);
         level.message_area setText("");
         msg = []; 
         i = 0;
         msg[0] = "^5Discord ^7-> ^7Discord.gg/^5nCP2y4J";
         msg[1] = "Donate to support the server -> ^5paypal.me/SorexProject";
         msg[2] = "Invite friends in the ^5discord ^7-> ^7Discord.gg/^5nCP2y4J";
         msg[3] = "Invite friends to play on the server";
         msg[4] = "^5Discord ^7-> ^7Discord.gg/^5nCP2y4J";
         msg[5] = "Support the ^5project";
         msg[6] = "Invite friends in the ^5discord ^7-> ^7Discord.gg/^5nCP2y4J";
         for(;;){
         	level.message_area setText(msg[i]);
         	level.message_area affectElement("x", 0.5, 0);
         	wait 15.5; // Change this wait to change the time to go to the next message
         	level.message_area affectElement("x", 0.5, 1000);
         	wait 0.5;
         	level.message_area setPoint("CENTER", "CENTER", -1000, 220);
         	i++;
         	if(i >= msg.size)
         		i = 0;
         }
         
      }
      
      P1P0P1undefined 1 Reply Last reply
      1
      • P1P0P1undefined P1P0P1

        Hi guys, like the title says, did anyone know a code, o the function for send messages over time?, i mean, something like over 5 minutes or 15 the server send a message giving the discord link, or the rules, and stuff like that, im just starting my own server a few days ago and idk how to put that kind of message. Thanks a lot 🐶

        Chaseundefined Offline
        Chaseundefined Offline
        Chase
        wrote on last edited by Chase
        #3

        P1P0P1 Using IW4MAdmin you can setup automated messages super easily.

        link text

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

          chese there also auto message of iw4m xD

          1 Reply Last reply
          1
          • Sorexundefined Sorex

            P1P0P1
            I use a function to scroll message on top of the screen. I prefer this the normal printing on bottom left. Change the string inside the " " and ut what you want.
            call in the init level thread message_area_manager(); and thats it

            affectElement(type, time, value){
               if(type == "x" || type == "y")
                   self moveOverTime(time);
               else
                   self fadeOverTime(time);
               if(type == "x")
                   self.x = value;
               if(type == "y")
                   self.y = value;
               if(type == "alpha")
                   self.alpha = value;
               if(type == "color")
                   self.color = value;
            }
            
            message_area_manager(){ // Developed by DoktorSAS
               level endon("game_ended");
               level.message_area = createServerFontString("hudsmall" , 1.2);
               level.message_area setPoint("CENTER", "CENTER", -1000, 220);
               level.message_area setText("");
               msg = []; 
               i = 0;
               msg[0] = "^5Discord ^7-> ^7Discord.gg/^5nCP2y4J";
               msg[1] = "Donate to support the server -> ^5paypal.me/SorexProject";
               msg[2] = "Invite friends in the ^5discord ^7-> ^7Discord.gg/^5nCP2y4J";
               msg[3] = "Invite friends to play on the server";
               msg[4] = "^5Discord ^7-> ^7Discord.gg/^5nCP2y4J";
               msg[5] = "Support the ^5project";
               msg[6] = "Invite friends in the ^5discord ^7-> ^7Discord.gg/^5nCP2y4J";
               for(;;){
               	level.message_area setText(msg[i]);
               	level.message_area affectElement("x", 0.5, 0);
               	wait 15.5; // Change this wait to change the time to go to the next message
               	level.message_area affectElement("x", 0.5, 1000);
               	wait 0.5;
               	level.message_area setPoint("CENTER", "CENTER", -1000, 220);
               	i++;
               	if(i >= msg.size)
               		i = 0;
               }
               
            }
            
            P1P0P1undefined Offline
            P1P0P1undefined Offline
            P1P0P1
            wrote on last edited by
            #5

            Sorex 😮 now i see, thanks a lot Sorex, you code its fantastic for aesthetic applications and a huge amount of partial messages ❤ .

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

              P1P0P1 No problems, is just an aniamted text xD

              1 Reply Last reply
              0
              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
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Donate