ULX

Author Topic: Player model changer  (Read 2429 times)

0 Members and 1 Guest are viewing this topic.

Offline Prince_Llamacorn

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Player model changer
« on: May 08, 2014, 02:59:25 PM »
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)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Player model changer
« Reply #1 on: May 08, 2014, 04:05:30 PM »
See Cobalt's commands here.
http://forums.ulyssesmod.net/index.php/topic,7268.0/
One of the many is "ulx model"
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Prince_Llamacorn

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Player model changer
« Reply #2 on: May 08, 2014, 04:19:05 PM »
Thanks :3

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Player model changer
« Reply #3 on: May 08, 2014, 10:53:00 PM »
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: [Select]
local pmodel = player_manager.TranslatePlayerModel( "alyx" )
ply:SetMode( pmodel )

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Player model changer
« Reply #4 on: May 08, 2014, 11:14:13 PM »
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
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.