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

Featured Replies

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

heello i want to enable planting sound to be same as diffusing

i got this code from server addon

public override void OnPlayerUse(ServerClient Client)
       {
           Vector origin = new Vector(Client.OriginX, Client.OriginY, Client.OriginZ);
           base.PlaySoundAtOrigin(origin, "mp_bomb_plant");
       }

can some 1 edit it to work in 4d1?

thx

Опубликовано:
Why don't you do it?

Also >copying code from IW5 sa... you must be really mw2player like.

u nab :x

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

I might be dumb but I can hear the planting sound just fine...

 

Anyways try this:

entity.OnNotify("weapon_change", (player, weap) =>
                   {
                       if (weap.ToString() == "briefcase_bomb_mp")
                       {
                                 Call("PlaySoundAtPos", entity.Origin, "mp_bomb_plant");
                       }
                   });

 

haven't tested this so I have no idea if playsoundatpos actually works I just found it.

Опубликовано:
with this code i can do any thing

my friend told me that i need to addput it in public void namespace() but idk how

pls if u can give me ready code to compile

thx

Here you go:

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

namespace LE3
{
   public class Learn2Code : BaseScript
   {
       public Learn2Code()
           :base()
       {
           PlayerConnected += new Action(entity =>
               {
                   entity.OnNotify("weapon_change", (player, weap) =>
                   {
                       if (weap.ToString() == "briefcase_bomb_mp")
                       {
                           Call("PlaySoundAtPos", entity.Origin, "mp_bomb_plant");
                       }
                   });
               });
       }
   }
}

 

Remember that we won't write everything out for you.

You need to learn it yourself ;)

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.