Need help in gamemode

cl_init
[LUA]
include( ‘shared.lua’ )

function create_clan()

CreateClan = vgui.Create( “DFrame” )
CreateClan:SetPos(ScrW() / 4,ScrH() / 4)
CreateClan:SetSize(400,300)
CreateClan:SetTitle(“Clan Creation”)
CreateClan:ShowCloseButton(true)
CreateClan:SetVisible(true)
CreateClan:MakePopup()

ClanName = vgui.Create(“DTextEntry”, CreateClan)
ClanName:SetPos(40,40)
ClanName:SetTall(20)
ClanName:SetWide(320)
ClanName:SetEnterAllowed(true)

ClanNameT = vgui.Create(“DTextEntry”, CreateClan)
ClanNameT:SetPos(40,80)
ClanNameT:SetTall(20)
ClanNameT:SetWide(320)
ClanNameT:SetEnterAllowed(true)

MakeClan = vgui.Create(“DButton”, CreateClan)
MakeClan:SetPos(220,120)
MakeClan:SetSize(160,40)
MakeClan:SetText(“Create Clan”)
MakeClan.DoClick = function()
RunConsoleCommand(“clan_set”)
team.SetUp(ClanNameT:GetValue(),ClanName:GetValue(),Color(0,128,0,255))
end

end

concommand.Add(“DA_Clan”,create_clan)

[/LUA]

init

[LUA]
AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )

include( ‘shared.lua’ )

function clan_set(ply)

ply:SetTeam(ClanNameT:GetValue())
ply:Spawn()

end

concommand.Add(“clan_set”,clan_set)
[/LUA]

So my question:
How can I send the value of ClanNameT to the server

[editline]04:03PM[/editline]

or any other solution

You could send it as an argument to the concommand.

I’m noob, so how? xD

[editline]04:42PM[/editline]

New:
cl_init

[LUA]
include( ‘shared.lua’ )

function create_clan()

CreateClan = vgui.Create( “DFrame” )
CreateClan:SetPos(ScrW() / 4,ScrH() / 4)
CreateClan:SetSize(400,300)
CreateClan:SetTitle(“Clan Creation”)
CreateClan:ShowCloseButton(true)
CreateClan:SetVisible(true)
CreateClan:MakePopup()

ClanName = vgui.Create(“DTextEntry”, CreateClan)
ClanName:SetPos(40,40)
ClanName:SetTall(20)
ClanName:SetWide(320)
ClanName:SetEnterAllowed(true)

ClanNameT = vgui.Create(“DTextEntry”, CreateClan)
ClanNameT:SetPos(40,80)
ClanNameT:SetTall(20)
ClanNameT:SetWide(320)
ClanNameT:SetEnterAllowed(true)

MakeClan = vgui.Create(“DButton”, CreateClan)
MakeClan:SetPos(220,120)
MakeClan:SetSize(160,40)
MakeClan:SetText(“Create Clan”)
MakeClan.DoClick = function()
Name = ClanNameT:GetValue()
RunConsoleCommand(“clan_set”,Name)
team.SetUp(ClanNameT:GetValue(),ClanName:GetValue(),Color(0,128,0,255))
end

end

concommand.Add(“DA_Clan”,create_clan)

[/LUA]

init

[LUA]
AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )

include( ‘shared.lua’ )

function clan_set(ply)

ply:SetTeam(Name)
ply:Spawn()
ply:ChatPrint(“Team : “…ply:Team()…” Name : “…Name…” (Csapat)”)

end

concommand.Add(“clan_set”,clan_set,Name)
[/LUA]

[editline]04:46PM[/editline]

Is it good?

[editline]04:47PM[/editline]

Because it isn’t working for me :S

init.lua:

[lua]
AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )

include( ‘shared.lua’ )

function clan_set(ply, cmd, args)

Name = args[1]
ply:SetTeam(Name)
ply:Spawn()
ply:ChatPrint(“Team : “…ply:Team()…” Name : “…Name…” (Csapat)”)

end

concommand.Add(“clan_set”,clan_set)
[/lua]

(ply, cmd, args) what are these?

[editline]06:18PM[/editline]

[LUA]
AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )

include( ‘shared.lua’ )

function clan_set(ply, cmd, args)

Name = args[1]
Name2 = args[2]
team.SetUp(Name,Name2,Color(0,128,0,255))
ply:SetTeam(Name)
ply:Spawn()
ply:ChatPrint(“Team : “…ply:Team()…” Name : “…Name…” (Csapat)”)

end

concommand.Add(“clan_set”,clan_set)
[/LUA]

[editline]06:20PM[/editline]

Team isn’t work