1. Hello. I need help with changing world models.
    For example i create world model of laptop:

    Code:
    DroppedItem worldModel = ItemManager.CreateByItemID(1490499512).Drop(player.transform.position, Vector3.zero).GetComponent<DroppedItem>();            worldModel.GetComponent<Rigidbody>().isKinematic = true;
                worldModel.GetComponent<Rigidbody>().useGravity = false
    worldModel.allowPickup = false;

    It's working, and when i am aiming at laptop, i see name of it. Can i change it? For example:
    "PLAY".
    Can i set command that will used if i will try to pick up that object? For example: /play?
     
  2. From what I am aware its not possible to change that name you see. Im sure you could draw 3d over it but besides that I don't think so. From what I can tell, that "Pickup" text you see if hard coded into the games. As seen in the WorldItem class.
     
  3. Okay, what about command?
    Or calling function?
     
  4. Code:
    void OnItemPickup(Item item, BasePlayer player)
    {
        Puts("OnItemPickup works!");
    }
    Im sure you could use this code to detect if it is the right item, and if so return false(so the player cant pick it up). Then do whatever with your code.
     
  5. Thank you, i will try!
    [DOUBLEPOST=1495311448][/DOUBLEPOST]
    return false dont working in this situation.
    [DOUBLEPOST=1495311860][/DOUBLEPOST]
    • Called right after an item has been picked up - so, i need to make it BEFORE picking up. because i need to set static position for worldmodel
     
  6. try
    CanPickupEntity
    or
    OnCollectiblePickup
     
  7. I think CanPickupEntity is for stuff like chairs, and OnCollecticlePickup is for stuff like hemp/stones/mushrooms/etc.