When my gamemode starts up all the players look like this
[img]http://i25.tinypic.com/2uq26q9.jpg[/img]
What's the lua function to change a players model?
To change an entity's model use SetModel()
You could do it this way :
[code]function GM:PlayerSpawn(ply)
ply:SetModel("path/to/your/model.mdl")
end[/code]
You should also know there is a wiki avaible and most of your questions can be answered by it : [url]http://wiki.garrysmod.com[/url]
For instance here's a page listing all of the methods you can use on an entity : [url]http://wiki.garrysmod.com/?title=Entity[/url]
Model changed but now it looks like this
[img]http://i30.tinypic.com/r9hd15.jpg[/img]
Make sure you're using a player model, in this case "models/player/alyx.mdl"
Awesome! Thank you man!
Where could I find the path to the American WWII playermodel?
Look in the model/player folder in the GMod gcf.
So I put this in init.lua, because ever since I put this code in init.lua I'm getting some weird errors like this.
[code]
InitFastCopy: only 49% fast props. Bug?
Lua initialized (Lua 5.1)
Registering gamemode 'sandbox' derived from 'base'
Registering gamemode 'ZombieMassacre' derived from 'sandbox'
ERROR: Trying to derive entity sent_rg_bullet from non existant entity base_point!
[/code]
Bump because I still haven't found and answer to this error.
[QUOTE=Pink Spy;17104677]Bump because I still haven't found and answer to this error.[/QUOTE]
Can you post what exactly you put in init.lua?
Sorry, you need to Log In to post a reply to this thread.