Перейти к содержимому
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.
Опубликовано:

I have a few questions for you)))

1) Is it possible to do:

For example I am the administrator, the player has zombie, and I write the command in the chat that he would become a man again, and vice versa. Can I?

2) Is it possible to do this:

Zombie make the speed of 240, and the speed of the original people 190

Featured Replies

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

I do not know much about scripting. Not help?)

Опубликовано:
I do not know much about scripting. Not help?)

What help do you need? I told you what to do for 1 and 2. For 1 look at the QCZM IW5M source code and look for the command "zombie/player" and you will see somewhere the code to switch teams. (I'm not home atm so I can't check.)

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

What's the problem?(

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

namespace zm
{
   public class ZmSpeed : BaseScript
   {
       private void Speed(Entity player)
       {
           OnInterval(100, () =>
           {
               if (player.GetField("sessionstate") != "axis")
               {
                   player.Call("setmovespeedscale", 2);
               }
               return true;
           });
       }
   }
}

Опубликовано:
What's the problem?

your code is syntactically correct.

 

(apart from the fact that Speed will never be called)

Опубликовано:
What's the problem?(

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

namespace zm
{
   public class ZmSpeed : BaseScript
   {
       private void Speed(Entity player)
       {
           OnInterval(100, () =>
           {
               if (player.GetField("sessionstate") != "axis")
               {
                   player.Call("setmovespeedscale", 2);
               }
               return true;
           });
       }
   }
}

 

Once again...you are missing a constructor in your class. The function: Speed will never be called.

Anyways please..please..please watch some yt videos about C# before starting writing scripts.

Опубликовано:
Anyways please..please..please watch some yt videos about C# before starting writing scripts.

classes don't *need* constructors, he just doesn't understand the API.

Опубликовано:
What's the problem?(

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

namespace zm
{
   public class ZmSpeed : BaseScript
   {
       private void Speed(Entity player)
       {
           OnInterval(100, () =>
           {
               if (player.GetField("sessionstate") != "axis")
               {
                   player.Call("setmovespeedscale", 2);
               }
               return true;
           });
       }
   }
}

 

here you go

 

using System;
using InfinityScript;

namespace zm
{
   public class ZmSpeed : BaseScript
   {
       public ZmSpeed()
           : base()
       {
           PlayerConnected += OnConnected;
       }

       void OnConnected(Entity Player)
       {
           /* Here you add stuff that you want to do when the player connects */
           Player.SpawnedPlayer += () => OnSpawned(Player);
       }

       private void OnSpawned(Entity dat)
       {
           /* Here you add stuff that you want to do when the player Spawns */
           Speed(dat);
       }

       private void Speed(Entity player)
       {
           OnInterval(100, () =>
           {
               if (player.GetField("sessionstate") != "axis")
               {
                   player.Call("setmovespeedscale", 2);
               }
               return true;
           });
       }
   }
}

Опубликовано:
Anyways please..please..please watch some yt videos about C# before starting writing scripts.

classes don't *need* constructors, he just doesn't understand the API.

 

True, but in this case it does need one because this is his main class.

Atleast thats what I figured because he said there was a problem with it :P

Опубликовано:
What's the problem?(

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

namespace zm
{
   public class ZmSpeed : BaseScript
   {
       private void Speed(Entity player)
       {
           OnInterval(100, () =>
           {
               if (player.GetField("sessionstate") != "axis")
               {
                   player.Call("setmovespeedscale", 2);
               }
               return true;
           });
       }
   }
}

 

here you go

 

using System;
using InfinityScript;

namespace zm
{
   public class ZmSpeed : BaseScript
   {
       public ZmSpeed()
           : base()
       {
           PlayerConnected += OnConnected;
       }

       void OnConnected(Entity Player)
       {
           /* Here you add stuff that you want to do when the player connects */
           Player.SpawnedPlayer += () => OnSpawned(Player);
       }

       private void OnSpawned(Entity dat)
       {
           /* Here you add stuff that you want to do when the player Spawns */
           Speed(dat);
       }

       private void Speed(Entity player)
       {
           OnInterval(100, () =>
           {
               if (player.GetField("sessionstate") != "axis")
               {
                   player.Call("setmovespeedscale", 2);
               }
               return true;
           });
       }
   }
}

 

the amount of functions in this is too damn high

why you use anonymous functions to wrap normal functions? makes no sense

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.