REEE, stop editing base scripts that will get removed everytime you update your server. Create an external resource.

I’ll help you get started.

  • You’re going to want something that both checks your skin and saves it to a database. Or if you don’t have a database, you could try a notepad file but I don’t recall how to pull that off and its rather inefficient.

So client side

  • Checks your skin on spawn, sends the information to the server side script.
  • Receives the saved skin, SetPlayerModel(playerid, spawnmodel) or PedModel? I forget, check your natives & references.

Server Side

  • Receives the skin, saves it in your database.
  • Pulls the skin from your database, sends it client side by triggering a client event.

That is the essence of what you have to do. I recall when I was making a script like this, it went essentially that. You do however have to save every variation of each component selected.

Example: You have a freemode multiplayer ped. Youre wearing a red shirt, white hat, and black jeans. By default the ped will load with the blue shirt, blue jeans, and bald head. So you have to save each variation so that it spawns you with the red shirt, white hat, and black jeans instead of the default. You also have to do it for the selected texture. So if the white hat is black by default, you wanna save each texture so it selects the black one verses the white one.

I think there’s 12 or so components to save? I can’t remember off the top of my head. Look at the ESX_skin scripts for reference to understand what I mean.

While editing the spawnmanager is easy, if you ever update your server any edits you make will be undone. It’s easier to make an external resource that’ll last + you’ll have everyones selections in your database