ULX

Author Topic: Spaw NPC with playermodel?  (Read 194 times)

0 Members and 1 Guest are viewing this topic.

Offline Bleidd64

  • Newbie
  • *
  • Posts: 2
  • Karma: 1
Spaw NPC with playermodel?
« on: March 30, 2019, 09:38:50 AM »
I have a playermodel Miku and I want to spawn a npc_citizen with that skin using "ulx ent". Is it possible to do? Note: that's what the Q menu in sandbox does - spawns a Citizen with model of Miku when I press on Miku.

Offline Timmy

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 193
  • Karma: 153
  • Code monkey
    • ULX Unofficial Documentation
Re: Spaw NPC with playermodel?
« Reply #1 on: April 09, 2019, 01:10:13 PM »
This is what such a command would look like:

ulx ent npc_citizen citizentype:4 | model:models/yourmodel.mdl



How to find the path to a model?
Start a new sandbox game, open the spawn menu, right-click the model and select "Copy to clipboard".



What do the flag and value pairs mean?
<flag>:<value>Meaning
citizentype:4This sets the citizen's appearance to "unique", making it use a custom model. (source, citizentype values)
model:models/yourmodel.mdlPath to the custom model.



See Topic: Pro tips for more "ulx ent" examples.
« Last Edit: April 12, 2019, 08:16:25 AM by Timmy »
“When given the choice between being right or being kind, choose kind.”  —Dr. Wayne Dyer

Offline Bleidd64

  • Newbie
  • *
  • Posts: 2
  • Karma: 1
Re: Spaw NPC with playermodel?
« Reply #2 on: April 19, 2019, 02:57:41 AM »
Thank you! The part I was missing was citizentype:4. I tried to do it like type:unique and type:4.