Solved Green craft notification?

Discussion in 'Rust Development' started by azalea`, Feb 1, 2016.

  1. How to make this green craft notification manually?

    2015-05-09_00005.png
     
    Last edited by a moderator: Feb 2, 2016
  2. You want it to be a custom text display?
     
  3. No, I wanna show this when I'm give something to player.
     
  4. Given a BasePlayer player and an Item item you can send the the popup message to the player with the following code.
    Code:
    player.Command("note.inv", new object[] { item.info.itemid, item.amount });
    Keep in mind that this does not give him the item, it just shows the popup message.

    Edit:
    Code:
    player.Command("note.inv", item.info.itemid, item.amount);
    Should work, as well.
     
  5. Sorry to post in an already solved thread, but I'm intrigued.

    Is there a way for us to lookup an Item and cast it to a new reference, so a custom item can be classified by the plugin? Pseudo example below.

    Code:
    Item i = Item.Find(-1725510067);
    i.info.name = "Test".
    
    This way, preferably you could customize the text to your liking.
     
  6. Sorry too, but I also have a question !
    It is possible to display custom values ?
    Like :
    Code:
    player.Command("note.inv", "Server Money", "5$");
     
  7. I am pretty sure that `note.inv` is a client command so it would do the item lookup client-sided so custom items probably won't work.
    This isn't possible, it only accepts an itemid and an amount.
     
  8. Thank U! :)
     
  9. Where is the notification image from? Is it tied to item.info? How would i go about displaying a custom message alongside a custom texture?
     
  10. I've previously asked regarding this and the answer is above, btw the image is also defined in ItemDefiniton.

    See: Solved - Green craft notification? | Oxide