Jump to content

[Help] Spawning Skinned Items


Recommended Posts

Hello!

Is there a way to spawn, e.g. a "firepit_hole" rather than c_give a bunch of logs and rocks and crafting one at a time?

There is a method explained by @rezecib ,

but for some reason, all it does is to spawn a vanilla firepit. I don't even see a "skin request" on the server console, as like it does when changing skinned clothes. Maybe has something changed since he posted this workaround?

I know about skin manipulation being something not welcome by Klei and overall community, please don't get me wrong on this one. I don't even think someone could use non-owned skins, since it requires previous server side validation. I understand this post should be removed if it broke some rule by any means.

My question is related on automated task, using a reward skin I own already, simple as it.

Thanks in advance.

EDIT: For some reason I can't get the link function to work, so I put the link inside the spoiler.

Edited by SrJardel
Failed to link the method.
Link to comment
Share on other sites

Thank you very much mate, I will test it when I get home.

I was using ingame console with Remote activated, but I am admin anyways. At first I tried on hosted server, then I tried on dedicated.

One quick question though. When I spawn something via client, the prefab is spawned right at the mouse pointer. So, I assume additional parameters like x and y coords are needed when spawning via server terminal?

Thanks again. :)

Link to comment
Share on other sites

9 minutes ago, SrJardel said:

One quick question though. When I spawn something via client, the prefab is spawned right at the mouse pointer. So, I assume additional parameters like x and y coords are needed when spawning via server terminal?

Yes. From the server terminal you need to refer to something since there's no cursor.

SpawnPrefab('firepit', 'firepit_hole', nil, UserToPlayer(1).userid).Transform:SetPosition(UserToPlayer(1):GetPosition():Get())

For example, this.

UserToPlayer(1) returns the entity with a 1 index on the clients table you see when pressing tab.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...