Перейти к содержимому
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.

How to spawn basic "bots" (testclients)

Featured Replies

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

I'm working on a modification, and I'd like spawn basic bots (ones that do absolutely nothing) - however, even after a while Googling, I can't find a decent tutorial/snippet of code for doing so.

 

Does anyone know how to do so?

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

Call with

self thread initTestClients(1);

 

Rest

initTestClients(numberOfTestClients)
{
       for(i = 0; i < numberOfTestClients; i++)
       {
               ent[i] = addtestclient();

               if (!isdefined(ent[i]))
               {
                       wait 1;
                       continue;
               }

               ent[i].pers["isBot"] = true;
               ent[i] thread initIndividualBot();
               wait 0.1;
       }
} 

initIndividualBot()
{
       self endon( "disconnect" );
       while(!isdefined(self.pers["team"]))
               wait .05;
       self notify("menuresponse", game["menu_team"], "autoassign");
       wait 0.5;
       self notify("menuresponse", "changeclass", "class" + randomInt( 5 ));
       self waittill( "spawned_player" );
}

Join the conversation

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

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

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

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

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

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

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.