• Print

Author Topic: How do you Spawn in "sitable" chairs with the ent ULX command?  (Read 6930 times)

0 Members and 1 Guest are viewing this topic.

Offline [FaKE]MoleMat

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
How do you Spawn in "sitable" chairs with the ent ULX command?
« on: January 23, 2016, 06:04:20 pm »
Alright so, you know how in Sandbox when you go to the "vehicles" tab in the Q menu, you can spawn chairs that you can sit down in with E? You can also do it with the console command "gm_spawnvehicle (chair name here)". Is there a way to do the same thing with the ent command? I know what the model paths are, but I can't seem to find the same type of "entity" the Sandbox mode chairs are.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: How do you Spawn in "sitable" chairs with the ent ULX command?
« Reply #1 on: January 24, 2016, 04:08:33 pm »
Does the ULX ent command support multiple keys/values when spawning? To spawn a chair properly you need to spawn the entity (prop_vehicle_prisoner_pod) set its model to a chair model of your choice and then modify a bunch of keyvals. Here is how I do it in my gamemode.

Code: Lua
  1.         ent = ents.Create("prop_vehicle_prisoner_pod")
  2.         local data = list.Get( "Vehicles" )["Seat_Jeep"]
  3.         if data.KeyValues then
  4.             for k, v in pairs( data.KeyValues ) do
  5.                 ent:SetKeyValue( k, v )
  6.             end
  7.         end
  8.         ent:SetPos( **position here** )
  9.         ent:Spawn()
  10.  

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How do you Spawn in "sitable" chairs with the ent ULX command?
« Reply #2 on: January 24, 2016, 05:21:09 pm »
Then this should work...

Code: [Select]
ulx ent prop_vehicle_prisoner_pod model:models/nova/jeep_seat.mdl limitview:0 vehiclescript:scripts/vehicles/prisoner_pod.txt

Please let us know if it does and I'll add it to our Pro Tips.
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: How do you Spawn in "sitable" chairs with the ent ULX command?
« Reply #3 on: January 24, 2016, 06:50:39 pm »
Megiddo,
On the protips page there are pipes | | | between spawn flags. Did you remove the need for those or does it work both ways?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How do you Spawn in "sitable" chairs with the ent ULX command?
« Reply #4 on: January 25, 2016, 07:00:33 am »
It works both ways. The pipes were an older syntax.
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: How do you Spawn in "sitable" chairs with the ent ULX command?
« Reply #5 on: January 25, 2016, 10:14:47 am »
Good to know. Thanks! :)

Offline [FaKE]MoleMat

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: How do you Spawn in "sitable" chairs with the ent ULX command?
« Reply #6 on: January 25, 2016, 02:03:57 pm »
Yep it works! Though I've tried it without the vehiclescript parameter and it did the same thing, so I'm not sure what the point of it is.

  • Print