Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Опубликовано:

dont work( what's wrong here?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using InfinityScript;

namespace skroll
{
   public class ScrollZ : BaseScript
   {
       public ScrollZ()
           : base()
       {
           //changeGametype("QCZM");
           Call("setdvar", "motd", "Welcome to Server!.");
       }
                private void createServerHud()
       {
           HudElem motd = HudElem.CreateServerFontString("boldFont", 1f);
           motd.SetPoint("CENTER", "BOTTOM", 0, -19);
           motd.Foreground = true;
           motd.HideWhenInMenu = true;
           OnInterval(25000, () =>
           {
               motd.SetText(Call("getdvar", "motd"));
               motd.SetPoint("CENTER", "BOTTOM", 1100, -10);
               motd.Call("moveovertime", 25);
               motd.X = -700;
               return true;
           });
                }
   }
}

Featured Replies

Опубликовано:

//changeGametype("QCZM");

...

Anyway do you even put a text on playerconnect or player spawned.

Also learn some C# you have absolutely no idea of what you're doing. You're just copying our code and trying to use it for your own mod which fails really hard.

Опубликовано:

dont work(

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using InfinityScript;

namespace skroll
{
   public class ScrollZ : BaseScript
   {
       public ScrollZ()
           : base()
       {
           PlayerConnected += new Action(entity =>
           {
                   Call("setdvar", "motd", "Welcome to Server!.");
               });
           }
       private void createServerHud()
       {
           HudElem motd = HudElem.CreateServerFontString("boldFont", 1f);
           motd.SetPoint("CENTER", "BOTTOM", 0, -19);
           motd.Foreground = true;
           motd.HideWhenInMenu = true;
           OnInterval(25000, () =>
           {
               motd.SetText(Call("getdvar", "motd"));
               motd.SetPoint("CENTER", "BOTTOM", 1100, -10);
               motd.Call("moveovertime", 25);
               motd.X = -700;
               return true;
           });
               }
   }
}

Опубликовано:
dont work(

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using InfinityScript;

namespace skroll
{
   public class ScrollZ : BaseScript
   {
       public ScrollZ()
           : base()
       {
           PlayerConnected += new Action(entity =>
           {
                   Call("setdvar", "motd", "Welcome to Server!.");
               });
           }
       private void createServerHud()
       {
           HudElem motd = HudElem.CreateServerFontString("boldFont", 1f);
           motd.SetPoint("CENTER", "BOTTOM", 0, -19);
           motd.Foreground = true;
           motd.HideWhenInMenu = true;
           OnInterval(25000, () =>
           {
               motd.SetText(Call("getdvar", "motd"));
               motd.SetPoint("CENTER", "BOTTOM", 1100, -10);
               motd.Call("moveovertime", 25);
               motd.X = -700;
               return true;
           });
               }
   }
}

You do realize that you're setting a dvar not a text for the HudElem "motd". There's a dvar for motd by the way.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.