• How to set a skin to a job?
    5 replies, posted
Hello, I want to know how I can let a job spawn with the right skin. The playermodel got 2 skins, I want the job spawn with the second skin, but I dont know how.
Are you talking like a body group? (hat or such)
u have to get a better f4 menu or revert to default
[QUOTE=Moat;52151930]You can use the PlayerSpawn job field to set the skin of the player using [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/SetSkin]Entity:SetSkin[/url]. The code will be ran when a player with that job has spawned. Here's an example: [lua] PlayerSpawn = function(ply) ply:SetSkin(2) --Change the skin of the player, number represents skin end [/lua] You might need to use a 1 or 2 second [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/timer/Simple]timer.Simple[/url] before you set the skin, not entirely positive. You can read more about advanced job fields [URL="http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields#More_advanced_fields"]here[/URL].[/QUOTE] my reply is not DUMB, you obviously dont have 2k hours on darkrp... his problem PROBABLY is he has a custom f4 menu that does not show a selection of the player models OR even worse does not know how to use the default f4 menu to change the skin [highlight](User was banned for this post ("Cares about ratings/Not helping/Shitpost - Either help or don't reply" - Reagy))[/highlight]
[QUOTE=bloodmasked;52152037]my reply is not DUMB, you obviously dont have 2k hours on darkrp... his problem PROBABLY is he has a custom f4 menu that does not show a selection of the player models OR even worse does not know how to use the default f4 menu to change the skin [highlight](User was banned for this post ("Cares about ratings/Not helping/Shitpost - Either help or don't reply" - Reagy))[/highlight][/QUOTE] This is the Developer Discussion, maybe the OP is looking for answers related to CODING and such. The answer you gave them would've been more appropriate in another section if the OP implied they don't know how to code, but here is out of place. Also, the OP is actually talking about player [b]skins[/b] and not [b]models[/b] and the default F4 menu doesn't have that in account, I don't even think that there's a single custom F4 menu out there that lets you choose between player skins, only models. Now my two cents on the matter: Maybe you want also to consider the next two methods: [code] Entity:SkinCount() -- returns the amount of available skins for the selected entity, the realm is SHARED Entity:GetSkin() -- returns the current skin number, the realm is also SHARED [/code]
Sorry, you need to Log In to post a reply to this thread.