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

Twice first infected preventer

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

Hi,

Sometimes a player gets first infected for two consecutive rounds. Sometimes for three O_O

This doesn't happen all the time but it's very frustrating. How to switch team for a player if he gets first infected a second time consecutively? (switching first infected to other team should activate the timer that picks a new first infected or not?).

 

Find first infected and put his name/xuid in a dvar

Next round, find the first infected

if he is the same, switch him to allies team

Find first infected and put his name/xuid in a dvar

etc..

 

To find first infected OnInterval(2000, ....) check if there's only one player in axis team and at least one player in allies team then save the player name /xuid.

What I'm missing is how to switch a player's team?

Featured Replies

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

                    player.SetField("team", "allies");
                   player.SetField("sessionteam", "allies");

Just switches the players team, doesn't kill them.

 

You can also try:

{
                           tc.Notify("menuresponse", "team_marinesopfor", "allies");

                           tc.AfterDelay(500, meh =>
                           {
                               meh.Notify("menuresponse", "changeclass", "class1");
                           });
                       });

tc. = player. or entity. your call, also call a suicide before you put that and it should work.

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.