2 problems with my model

I have 2 problems with my model, first of all, it’s a player model, and the first problem is that I am able to see it in the player model selection menu, but when I select it, my model doesn’t change to it. I have to run a lua command in the console for it to work properly.

Next, how can I skin it? I’ve applied only a basic material onto it, my model is a cactus that is supposed to look rather similar to cactuar in terms of it’s textures, so it’s sorta cartoony. However, my hand-drawn skins in Photoshop look outright horrible, so I was wondering how do /you/ do it?

It doesn’t automatically switch your model when you click it you have to select it then kill yourself for it to change (or do what you did).

Also have you got a screenshot of it? so I can see what your on about.

I have killed myself. No dice.

The unwrap or the model?

Not sure whats up with that.

Either or both (probberly both, then I can see what it looks like in both ways).

Isn’t there supposed to be a lua file that sets your model in the player selection menu? I might have typed wrong.

are you not even selecting it from the menu, I thought from what you said you were.

 if ( SERVER ) then
player_manager.AddValidModel( "Name", "models/Name.mdl" );

AddCSLuaFile( 'assassin.lua' ) ;

list.Set( "PlayerOptionsModel", "Name", "models/Name.mdl" );

Should look exactly like that with Name subsituted with the name of your model.

I selected it from the menu, killed myself, my model didn’t change. Also, thanks.

I think your problem is that player_manager.AddValidModel() isn’t being run during a singleplayer game.
The problem should go away when you set “maxplayers” to something higher than 1, then load a map. If it doesn’t, then I’m wrong. Try changing the first line of Silver Spirit’s script to this:
if ( SERVER ) or ( SinglePlayer() ) then
By the way, semicolons are unnecessary and are ignored by GMod Lua.

All I put up there is the basic script I use when applying a player model to the list (which is taken from many ones i’ve downloaded). Didn’t know about the semicolon thing at all :slight_smile:

The player_manager.AddValidModel() is on all the playermodel lua scripts i’ve got and theres no issues with it being there (though even with my limited lua knowledge I didn’t think that line made any sense being there).

Didn’t work… even if I add “if ( SERVER ) or ( SinglePlayer() ) then”.

Here’s what I have so far.

if ( SERVER ) or ( SinglePlayer() ) then 
	player_manager.AddValidModel( "cactus", "models/player/cactus.mdl" )
	AddCSLuaFile( "autorun/cactus.lua" )

list.Set( "PlayerOptionsModel", "Cactus", "models/player/cactus.mdl" )

Change it to:
[lua]player_manager.AddValidModel( “Cactus”, “models/player/cactus.mdl” )
list.Set( “PlayerOptionsModel”, “Cactus”, “models/player/cactus.mdl” )[/lua]

And make sure the file is called something like cactus_player_model.lua.

Oh hey! That worked! What makes it different?

Well, there was “cactus” and “Cactus”, which conflict and have to be the same to work.

And all the other stuff you had in there was useless.