Пример #1
0
    public void ToggleRinging(bool state)
    {
        MobileInventoryEntity associatedEntity = ItemModAssociatedEntity <MobileInventoryEntity> .GetAssociatedEntity(GetItem());

        if (associatedEntity != null)
        {
            associatedEntity.ToggleRinging(state);
        }
    }
    public override void ServerCommand(Item item, string command, BasePlayer player)
    {
        base.ServerCommand(item, command, player);
        MobileInventoryEntity associatedEntity = ItemModAssociatedEntity <MobileInventoryEntity> .GetAssociatedEntity(item);

        if (command == "silenton")
        {
            associatedEntity.SetSilentMode(true);
        }
        else if (command == "silentoff")
        {
            associatedEntity.SetSilentMode(false);
        }
    }
Пример #3
0
    public override void ServerCommand(Item item, string command, BasePlayer player)
    {
        base.ServerCommand(item, command, player);
        PagerEntity associatedEntity = ItemModAssociatedEntity <PagerEntity> .GetAssociatedEntity(item);

        switch (command)
        {
        case "stop":
            associatedEntity.SetOff();
            break;

        case "silenton":
            associatedEntity.SetSilentMode(true);
            break;

        case "silentoff":
            associatedEntity.SetSilentMode(false);
            break;
        }
    }