ItsMods

Full Version: Way to keep text on server screen?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know there is a way and i was giving a code but have no clue what to do with it . I want to be able to keep text in game to stay there . This is code i was given but i was not told what to do with it .

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfinityScript;

namespace messageS
{
    public class messageS : BaseScript
    {
        private HudElem info;
        public messageS()
            : base()
        {

            playerConnected += new Action<Entity>(entity =>
            {
                info = HudElem.CreateServerFontString("hudbig", 1.2f);
                info.SetPoint("TOPCENTER", "TOPCENTER", 0, 1);
                info.HideWhenInMenu = true;
                info.SetText("message 1");
            
                 info = HudElem.CreateServerFontString("hudbig", 1.0f);
                info.SetPoint("BOTTOMCENTER", "BOTTOMCENTER", 0, 1);
                info.HideWhenInMenu = true;
                info.SetText("message 2");

                info = HudElem.CreateServerFontString("hudbig", 0.6f);
                info.SetPoint("TOPRIGHT", "TOPRIGHT", 0, 1);
                info.HideWhenInMenu = true;
                info.SetText("message 3");


            });
        }
    }
}

Where would i put this in our mw3 server files. Or what do i do to get this to work?
I knew how to do it on mw2 but im trying to get it to work on mw3 and i can not figure it .
(12-09-2013, 19:57)SycoKill3r Wrote: [ -> ]I know there is a way and i was giving a code but have no clue what to do with it . I want to be able to keep text in game to stay there . This is code i was given but i was not told what to do with it .

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfinityScript;

namespace messageS
{
    public class messageS : BaseScript
    {
        private HudElem info;
        public messageS()
            : base()
        {

            playerConnected += new Action<Entity>(entity =>
            {
                info = HudElem.CreateServerFontString("hudbig", 1.2f);
                info.SetPoint("TOPCENTER", "TOPCENTER", 0, 1);
                info.HideWhenInMenu = true;
                info.SetText("message 1");
            
                 info = HudElem.CreateServerFontString("hudbig", 1.0f);
                info.SetPoint("BOTTOMCENTER", "BOTTOMCENTER", 0, 1);
                info.HideWhenInMenu = true;
                info.SetText("message 2");

                info = HudElem.CreateServerFontString("hudbig", 0.6f);
                info.SetPoint("TOPRIGHT", "TOPRIGHT", 0, 1);
                info.HideWhenInMenu = true;
                info.SetText("message 3");


            });
        }
    }
}

Where would i put this in our mw3 server files. Or what do i do to get this to work?
I knew how to do it on mw2 but im trying to get it to work on mw3 and i can not figure it .

IW5M and 41 and InfinScript don't supporedton fis forum
Ok sorry i thought i could just get someone to tell me file to edit. Sorry about this
It's a hud element which creates for every player.
Try to make common one.