General > Developers Corner

Player model changer

(1/1)

Prince_Llamacorn:
I've been searching for a while but i can't figure out how to make a player model changer command could someone help
(I'm new)

JamminR:
See Cobalt's commands here.
http://forums.ulyssesmod.net/index.php/topic,7268.0/
One of the many is "ulx model"

Prince_Llamacorn:
Thanks :3

MrPresident:
Essentially you do it with two functions:

First you need to translate the player model ( unless you know the exact path to the model you want)
To do this, Use: player_manager.TranslatePlayerModel( modelname )

Once you have the model path, just use entity:SetModel( model ) like you would with anything else.
Player:SetModel( model )

^^ The links take you to relevant wiki articles. ^^


EXAMPLE:

(in this example, ply is the player entity. I will assume you already know what that is and how to use it)


--- Code: ---local pmodel = player_manager.TranslatePlayerModel( "alyx" )
ply:SetMode( pmodel )

--- End code ---

Bite That Apple:
I don't have too much time, but you might be able to get an idea of an addon I made a while back:
http://forums.ulyssesmod.net/index.php/topic,6184

Navigation

[0] Message Index

Go to full version