1. Hello all, i have this code:
    Code:
    MULTVALUE = 0.5
    function PLUGIN:OnGather( dispenser, entity, item )  if entity:ToPlayer() then
      if tonumber( item.amount ) then
      item.amount = item.amount * MULTVALUE
           self:SendMessage( entity, item.info.displayname )
      end
      end
    end
    whats wrong with this line?
    Code:
    self:SendMessage( entity, item.info.displayname )
    
    i'm new in rust lua and can't find some manuals...
     
    Last edited by a moderator: Feb 24, 2015
  2. They changed the way this is stored, item.info.displayName.translated or item.info.displayName.english. For now both return the same as the only an english is loaded by the server (a few other languages are in the assets but these are incomplete)
     
  3. You can give link on wiki? or it's not real as: http://wiki.garrysmod.com/page/Main_Page
     
  4. Wulf

    Wulf Community Admin

  5. ok, can you say? this part right?
    self:SendMessage( entity,
     
  6. Wulf

    Wulf Community Admin

    I don't know how to get the player from the entity, but you can see how to properly use the chat message function here: http://docs.oxidemod.org/#sendchatmessage. What Mughisi gave you should work.
     
  7. You don't know how i get another name of item? or id? i can't check Metal Ore because they don't have _
     
  8. @Mughisi already showed you how to get the item name and @Wulf already pointed you in the right direction for sending of messages.
     
  9. Thanks for help, but i have one question, how i can detect player ACTIVE tool/weapon(axe and etc.) in hands?
     
    Last edited by a moderator: Feb 25, 2015
  10. Decompile the Rust dlls and look at the BasePlayer class and your answer is there. We are not here to provided support for the Rust dlls.
     
  11. Somebody can say how i can get active item? on lua
     
  12. As stated earlier your answer lies in the BasePlayer class, decompile Assembly-CSharp.dll and you'll see the field you need..You'll need to do it sooner rather than later otherwise you'll just be copying other peoples work and won't ever know how to fix your own plugins if they break. You will be relying on another plugin dev to fix his plugin so that you can copy his fix's.