Hello
So I run a dedicated server, with the OS linux. I've noticed that sometimes it doesn't recognize my custom addons. I want to work around the file below, I took the code straight from another addon of mine WHICH WORKS! I don't quite understand why typing the chat command !create won't open the dframe. I can only assume there's a noob mistake in there.
Please note that I install the addons while the server is shut down, I then started it no luck, restated it, no luck and changed map, no luck.
[LUA]
-- CLIENT FILE
if CLIENT then
net.Receive( 'CustomMenu', function()
local base = vgui.Create( 'DFrame' )
base:SetSize( 480, 240 )
base:Center()
base:MakePopup()
base:SetVisible( true )
base:SetDraggable( false )
base:SetTitle( "Create Group" )
function base:Paint( w, h )
draw.RoundedBox( 0, 0, 0, w, h, Color( 18, 18, 18, 250 ) )
end
end )
end
-- SERVER FILE
if SERVER then
util.AddNetworkString( 'CustomMenu' )
local chatCommands = {
"!create",
}
hook.Add( "PlayerSay", "ChatCheck", function( ply, text, bteam )
if ( table.HasValue( chatCommands, text:lower() ) ) then
net.Start( 'CustomMenu' )
net.Send( ply )
return ""
end
end )
end
[/LUA]
Thanks :3
you have to AddCSLuaFile it.
check that your filenames and foldernames have no spaces and are uncapitalised. Linux won't recognise them otherwise.
[QUOTE=Splerge;48526850]check that your filenames and foldernames have no spaces and are uncapitalised. Linux won't recognise them otherwise.[/QUOTE]
Wrong, somehow my linux server works with that :p -Ubuntu, if it has an effect
Sorry, you need to Log In to post a reply to this thread.