I’m not exactly new to Lua, but it’s my first time using Derma properly(I think). Now I’m not getting any error messages in either server, but on the dedicated server my commands refuse to register. Could it be the way I have my code set up and what not?
Here’s the script:
function mainmenu()
local MainMenu
local SpawnIcon1FIDG
local SpawnIcon1EETM
local SpawnIcon1
local RpDesc
local RpName3
local DLabel3
local RpName2
local Start
MainMenu = vgui.Create('DFrame')
MainMenu:SetSize(481, 694)
MainMenu:SetPos(272, 12)
MainMenu:SetTitle('Welcome to Vanilla!')
MainMenu:SetSizable(true)
MainMenu:SetDeleteOnClose(false)
MainMenu:SetBackgroundBlur(true)
MainMenu:MakePopup()
SpawnIcon1FIDG = vgui.Create('SpawnIcon',MainMenu)
SpawnIcon1FIDG:SetPos(179, 83)
SpawnIcon1FIDG.OnMousePressed = function( icon ) surface.PlaySound( "ui/buttonclickrelease.wav" ) RunConsoleCommand("rp_setmodel","models/players/perp2suit/male_03.mdl") end
SpawnIcon1FIDG:SetModel('models/players/perp2suit/male_03.mdl')
SpawnIcon1EETM = vgui.Create('SpawnIcon',MainMenu)
SpawnIcon1EETM:SetPos(115, 83)
SpawnIcon1EETM.OnMousePressed = function( icon ) surface.PlaySound( "ui/buttonclickrelease.wav" ) RunConsoleCommand("rp_setmodel1","models/players/perp2suit/male_04.mdl") end
SpawnIcon1EETM:SetModel('models/players/perp2suit/male_04.mdl')
SpawnIcon1 = vgui.Create('SpawnIcon',MainMenu)
SpawnIcon1:SetPos(51, 83)
SpawnIcon1.OnMousePressed = function( icon ) surface.PlaySound( "ui/buttonclickrelease.wav" ) RunConsoleCommand("rp_setmodel2","models/players/humans/group01/clo4fe_01.mdl") end
SpawnIcon1:SetModel('models/players/humans/group01/clo4fe_01.mdl')
RpDesc = vgui.Create('DLabel',MainMenu)
RpDesc:SetPos(51, 627)
RpDesc:SetText('Description')
RpDesc:SizeToContents()
RpDescrip = vgui.Create('DTextEntry',MainMenu)
RpDescrip:SetSize(158, 20)
RpDescrip:SetPos(116, 623)
RpDescrip.OnEnter = function() end
RpName3 = vgui.Create('DLabel',MainMenu)
RpName3:SetPos(51, 652)
RpName3:SetText('Job')
RpName3:SizeToContents()
RpJob = vgui.Create('DTextEntry',MainMenu)
RpJob:SetSize(158, 20)
RpJob:SetPos(116, 648)
RpJob.OnEnter = function() end
DLabel3 = vgui.Create('DLabel',MainMenu)
DLabel3:SetPos(45, 47)
DLabel3:SetText('Please select a player model! This will represent your character in-game!')
DLabel3:SizeToContents()
RpName2 = vgui.Create('DLabel',MainMenu)
RpName2:SetPos(51, 678)
RpName2:SetText('Set an RP Name')
RpName2:SizeToContents()
RPName = vgui.Create('DTextEntry',MainMenu)
RPName:SetSize(158, 22)
RPName:SetPos(115, 673)
RPName.OnEnter = function() end
Start = vgui.Create('DButton',MainMenu)
Start:SetSize(95, 28)
Start:SetPos(158, 670)
Start:SetText('Start')
Start.DoClick = function() end
end
concommand.Add("rp_mainmenu",mainmenu)
function setmodel(ply)
ply:SetModel("models/players/perp2suit/male_03.mdl")
end
concommand.Add("rp_setmodel",setmodel)
function setmodel2(ply)
ply:SetModel("models/players/perp2suit/male_04.mdl")
end
concommand.Add("rp_setmodel1",setmodel2)
function setmodel3(ply)
ply:SetModel("models/players/humans/group01/clo4fe_01.mdl")
end
concommand.Add("rp_setmodel2",setmodel3)
Any help with this would be greatly appreciated, I’d just like to get it working on the dedicated server so I can continue work.