Jump to content

setting a default skin for spawn/connecting


5150

Recommended Posts

so i have private skins in my server, but every time a player spawns, they get a random skin, which sometimes allows them access to the private skins (if they get it by luck with default). does anyone have a script that will always set a players skin to 0 (CJ) when they spawn?

Link to comment

Yes, when you create your spawnpoints using createSpawnpoint (spawnmanager/spawn.lua - line 6), just specify the skin as the ID of your default skin to 0.

exports.spawnmanager:createSpawnpoint(0, 0, 5, 90, 0 --[[ CJ skin ]], 0, 0) 

That will create a spawnpoint at 0, 0, 5 (center of the map), rotate the player 90 degrees, spawn him with the CJ skin and put him in interior and dimension 0.

Link to comment

the play gamemode doesn't uses createSpawnpoint, it just spawn the player using spawnPlayerAtSpawnpoint and then set him skin to a random one.

To edit this just open play/broph.lua and find line 19:

repeat until setElementModel(player,math.random(312)) 

change to:

setElementModel( player, 0 ) 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...