1. Is it possible add item to a inventory from website using PHP/Rcon?
    I'm doing a shopping and I need to do it.

    I thank you
     
  2. if you want to do a webshop, its possible. You will need to send a message to a plugin on the server which gives the item to the player
     
  3. But will I need to do this plugin or it exists?
    And if I use this plugin, the server will be in Community or Modded?

    Thanks
     
  4. you can make it as community without any plugins also
     
  5. Can you help me?
     
  6. By using the RCOn and console commands?
     
  7. yes ^^
     
  8. I've tried

    $server1 = new RustRcon('ipadress', '28017', 'password');

    if ($server1->Auth()) {
    $return = $server1->rconCommand("inv.giveplayer nick Metal Fragments 100");
    }

    But show me that command not found.
    Others like 'kick' work
     
  9. inventory.giveto ;) and you need to use quotes for items with spaces
     
  10. Thanks, but I'm getting "Invalid Item!"

    Can you look if it's correct?
    Code:
    $nick    = "nick";
        $item    = "Wood";
        $ammount = 100;    if ($server1->Auth())  {
            $return = $server1->rconCommand('inventory.giveto '.$nick.' '.$item.' '.$ammount.'');
            echo "<pre>$return</pre>";
        }
    
    Sorry, it's necessary to use Item shortname.

    Thanks all
     
    Last edited by a moderator: Sep 15, 2015
  11. Where you get rust rcon php api? Private?
     
  12. Use this: xPaw/PHP-Source-Query · GitHub

    Some code from me for you: [PHP] Give Items to player á web [RUST] - Pastebin.com ( not tested, but you can fix some issues )

    Now you just have to make a simple form.
    Your input fields should be: token, items, amounts, name

    Make a password input for the token field, don't use hidden input and write the token in the code! NEVER EVER!!! It's like a password for this function.

    The items input should look like this: > ammo.rocket.basic,ammo.rocket.hv < if you just want to send one item with x amount, don't enter any comma. If you wanna send multiple items than just make a comma between the items WITHOUT whitespace.

    The amounts input should be the same like items: > 1,2 < no whitespace between the amount, only a comma.

    Can't garantuee that this will work, because I just downgraded my version of this file. ( I'm using a itemshop with items in a database )

    The name input it's like a normal input. You can use steamid64 or playername. No multiple names possible for this right now, easy to get this feature inside.
     
  13. If you want to do it without rcon, alternatively you can use webrequests
     
  14. Webrequest from site to server? Without rcon? You're fun
     
  15. Thats what i meant. But he will need plugins for that
     
  16. Plugin can receive webrequest without rcon from website?
     
  17. should be able to. In some way. Just play around with it.