Solved Spawning a car?

Discussion in 'Rust Discussion' started by Togoshige, Sep 21, 2017.

  1. Is it possible to spawn a car into the game yet?

     
  2. on staging yes, "spawn sedan" in console
     
  3. how to leave ??
     
  4. i assume you can ent kill it?
     
  5. E to enter/mount, Spacebar to leave/dismount
     
  6. what is car GetComponent ??
     
  7. I have a server with GameServers, what is staging? I can't get this to work.
     
  8. try update?
     
  9. Don't need staging branch, works on stable branch just go to console and type: spawn sedan
     
  10. anyway to get my npc to spawn the sedans i have this in my shop but it takes the coins but no cars spawn i was told about adding auth level 2 to my npcs but i dont know how to do this here is my code i have at the moment

    Code:
    "Car": {
          "buy": "2000",
          "img": "",
          "cmd": ["spawnsedan 727.4265 0.3007777 -1580.33" ],
          "cooldown": "60",
          "sell": "0"
        },
     
  11. Code:
        "Car": {
          "buy": "30000000",
          "cmd": [
            "spawn sedan \"$player.x $player.y $player.z\""
          ],
          "cooldown": "7200",
          "img": "http://i.imgur.com/mWP6Qec.png",
          "sell": "-1"
        },
    So Eazy~
     
  12. yeah but thats spawning on the player i want mine to spawn on the cords or am i wrong
     
  13. Change "spawnsedan" to "spawn sedan" maybe?
     
  14. ive tryed both still same result


    i managed to sort it out here is what i did

    Code:
    "Car": {
          "buy": "2000",
          "img": "",
          "cmd": ["spawn sedan  \"727.0599 1.191193 -1580.163\"" ],
          "cooldown": "60",
          "sell": "0"
        },
     
    Last edited by a moderator: Sep 22, 2017
  15. How to check whether the coordinate of any car?
    I mean, if create cars spawn point.
    Example: the car will spawn at the coordinates 727.0599 1.191193 -1580.163 every 5 min.
    But if no one will take the car, will be a congestion cars?
     
    Last edited by a moderator: Sep 23, 2017
  16. i just added a npc in where i wanted the car to spawn then i copyed the npcs cords to the right place then remove the npc after
     
  17. any way to get the car in the serverrewards shop ? then can spawn players by yours self ?
    that people can buy a car in the shop with RP Points
     
    Last edited by a moderator: Sep 23, 2017
  18. yeah this is how i do it i use GUIShop.cs and i added it there so players can spawn it when they want it just cost them coins

    this is the code you need to add but it may be diffrent on rewardshop
    Code:
    "Car": {
          "buy": "2000",
          "img": "",
          "cmd": ["spawn sedan  \"732.6604 0.3015063 -1575.397\"" ],
          "cooldown": "60",
          "sell": "0"
        },

    Code:
    "589463004": {    <---- change to your shop id
          "buy": [
            "Car"
          ],
          "description": "You currently have {0} coins to spend ",
          "name": "Car_Dealer",
          "sell": []
        },
     
    Last edited by a moderator: Sep 23, 2017
  19. works this with plugin ServerRewards ?

    i have only in data filme something like this:

    "ammo.pistol_0": {
    "shortname": "ammo.pistol",
    "displayName": "Pistol Bullet",
    "customIcon": null,
    "amount": 100,
    "cost": 2000,
    "skinId": 0,
    "category": 9
    },

    it looks like not the same code
     
  20. should be in the json file config folder