Won't set playermodel

I’m trying to make a really simple team-based mod, but it won’t set the team’s playermodel.

What am I doing wrong?

Init
ddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )
AddCSLuaFile( “specialchars.lua” )

include( ‘shared.lua’ )
include( ‘specialchars.lua’ )

function GM:PlayerSpawn( ply )

self.BaseClass:PlayerSpawn( ply )   


ply:SetMaxHealth( 100, true )  

ply:SetWalkSpeed( 260 )  
ply:SetRunSpeed( 450 ) 

end

function GM:PlayerInitialSpawn( ply )
CheckSpecialCharacters( ply )
arp_team1( ply )
if ply:IsAdmin() then
arp_team2( ply )
end
end

function GM:PlayerLoadout( ply )

if ply:Team() == 1 then 
	
	ply:Give( "weapon_physcannon" )
	ply:Give( "weapon_physgun" ) 
	ply:Give( "gmod_tool" ) 
	
elseif ply:Team() == 2 then

	ply:Give( "weapon_physcannon" )
	ply:Give( "weapon_ar2" )
	ply:Give( "gmod_tool" )

	
end

end

function arp_team1( ply )

ply:UnSpectate()
ply:SetTeam( 1 )
ply:SetModel( "models/player/combine_super_soldier.mdl" )
ply:Spawn()
ply:PrintMessage( HUD_PRINTTALK, "Welcome to the server, " .. ply:Nick() )

end
concommand.Add( “arp_team1”, arp_team1 )

function arp_team2( ply )

ply:UnSpectate()
ply:SetTeam( 2 )
ply:SetModel( "models/player/kleiner.mdl" )
ply:Spawn()
ply:PrintMessage( HUD_PRINTTALK, "Welcome to the server, " .. ply:Nick() )

end
concommand.Add( “arp_team2”, arp_team2 )

function joining( ply )

ply:Spectate( 3 )

end

cl_init
include( “shared.lua” )

Shared.lua
GM.Name = “Authority RolePlay” //Set the gamemode name
GM.Author = “Nefiron” //Set the author name
GM.Email = “iamnefiron@gmail.com” //Set the author email
GM.Website = “www.blackmuffin.dk” //Set the author website

DeriveGamemode( “sandbox” )

team.SetUp( 1, “Citizen”, Color( 0, 125, 0, 255 ) )
team.SetUp( 2, “The Authority”, Color( 125, 0, 0, 255 ) )
team.SetUp ( 3, “Joiners”, Color( 0, 0 , 0, 255 ) )

What do I do wrong?
It dosen’t give me any errors when testing the code.

Use lua tags like [noparse][lua]–code[/lua][/noparse] to make it readable…

[Lua]Init
ddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )
AddCSLuaFile( “specialchars.lua” )

include( ‘shared.lua’ )
include( ‘specialchars.lua’ )

function GM:PlayerSpawn( ply )

self.BaseClass:PlayerSpawn( ply )

ply:SetMaxHealth( 100, true )

ply:SetWalkSpeed( 260 )
ply:SetRunSpeed( 450 )

end

function GM:PlayerInitialSpawn( ply )
CheckSpecialCharacters( ply )
arp_team1( ply )
if ply:IsAdmin() then
arp_team2( ply )
end
end

function GM:PlayerLoadout( ply )

if ply:Team() == 1 then

ply:Give( “weapon_physcannon” )
ply:Give( “weapon_physgun” )
ply:Give( “gmod_tool” )

elseif ply:Team() == 2 then

ply:Give( “weapon_physcannon” )
ply:Give( “weapon_ar2” )
ply:Give( “gmod_tool” )

end
end

function arp_team1( ply )

ply:UnSpectate()
ply:SetTeam( 1 )
ply:SetModel( “models/player/combine_super_soldier.mdl” )
ply:Spawn()
ply:PrintMessage( HUD_PRINTTALK, "Welcome to the server, " … ply:Nick() )

end
concommand.Add( “arp_team1”, arp_team1 )

function arp_team2( ply )

ply:UnSpectate()
ply:SetTeam( 2 )
ply:SetModel( “models/player/kleiner.mdl” )
ply:Spawn()
ply:PrintMessage( HUD_PRINTTALK, "Welcome to the server, " … ply:Nick() )

end
concommand.Add( “arp_team2”, arp_team2 )

function joining( ply )

ply:Spectate( 3 )

end

cl_init
include( “shared.lua” )

Shared.lua
GM.Name = “Authority RolePlay” //Set the gamemode name
GM.Author = “Nefiron” //Set the author name
GM.Email = “iamnefiron@gmail.com” //Set the author email
GM.Website = “www.blackmuffin.dk” //Set the author website

DeriveGamemode( “sandbox” )

team.SetUp( 1, “Citizen”, Color( 0, 125, 0, 255 ) )
team.SetUp( 2, “The Authority”, Color( 125, 0, 0, 255 ) )
team.SetUp ( 3, “Joiners”, Color( 0, 0 , 0, 255 ) )[/Lua]

Oh sorry. couldn’t find the right way to do it. :stuck_out_tongue:
But yeah I need help with this

[editline]02:13PM[/editline]

anyone is able to help me?

Try spawning the player then setting their model

ply:SetModel( “models/player/combine_super_soldier.mdl” )
ply:Spawn()

Should be

ply:Spawn)
ply:SetModel( “models/player/combine_super_soldier.mdl” )

Why not just go into the GM:playersetplayermodel hook or whatever, and do it from there.

Why not do this?