black character

Hi!
ive almost finished my gamemode but i noticed another problem…
my character (player model) is black, any help? theres no errors or anything in console

http://i.share.pho.to/d93a245a_o.png

i would love some help, thanks Guys!

Any code? That’s player.mdl and it’s a fallback when no other playermodel has been set.

You need to assigned a player model to both teams…

this is my init.lua file


function GM:PlayerSpawn( ply )
	
	ply:SetModel("models/player/group01/male_07.mdl")
	ply:GiveGamemodeWeapons()
	LocalPlayer():AddEnergy( 100 )
end

Not sure why you’re using a combination of ply and LocalPlayer() in serversided code (where LocalPlayer() does not exist because the server is not a player)

As I went over just a little bit ago in your other thread, you don’t need to (and can not) use LocalPlayer() there because A) The player object is already supplied for you (ply) and B) PlayerSpawn is serverside only

When you overwrite PlayerSpawn, be sure to also set up PlayerSetModel and PlayerLoadout hooks. Take a look at how this does it: https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/spectating_players_system.lua.html

PlayerSetModel is where you set the player-model and PlayerLoadout is where you give weapons.

You’re also calling LocalPlayer( ) in a SERVERside hook ( if you’re not getting errors, it’s because the code is on the client-side and is NOT being executed at all ).

Make sure PlayerSpawn is SERVERside.