1. When I`m using PrintToChat(player, msg), everyone in certain radius from player receives a message. Any function/methods to send message to only player?
     
  2. Wulf

    Wulf Community Admin

    The way you are using PrintToChat with a player, it will only be sent to play player. If you use PrintToChat without a player, it will broadcast like you said. Check to make sure which method you are using.
     
  3. Here`s part of code:

    Code:
    [ChatCommand("rollbp")]
    void RollBp(BasePlayer player, string command, string[] args)
    {
        if(IsAllowed(player, "LegBPS.CanChangeBps"))
        {
            Item item = ItemManager.CreateByItemID(-1887162396, 1, 1);
            item.blueprintTarget = rndBp.GetRandomBp();
             
            player.GiveItem(item);
            string msg = String.Format("Поздравляем! Вы выиграли чертёж {0}!", ItemManager.FindItemDefinition(item.blueprintTarget).shortname);
                 
            PrintToChat(player, msg);
            //player.ChatMessage(String.Format("Поздравляем! Вы выиграли чертёж {0}!", ItemManager.FindItemDefinition(item.blueprintTarget).shortname)); //This works correctly
        }
    }
     
  4. Wulf

    Wulf Community Admin

    player.ChatMessage("hello") would be the same as PrintToChat(player, "hello").

    PrintToChat("hello") however would not be the same, that is a broadcast as there is no player given.
     
  5. Yes, I understand. But, as I said, when I`m using PrintToChat(player, msg) everyone recieves it. Mystery. Anyway, thanks for help!
     
  6. Wulf

    Wulf Community Admin