Book Mod (Not so good name)

I haven’t released this to the workshop yet because this is only intended for DarkRP, but I have made this mod that lets you write books and publish them for other people’s consumption.

Currently Spawning a book through q menu doesn’t really work, but when you buy your book, it looks like this.

When you open it, you can edit the text, and change a few options
The stop sign freezes your book so others cannot steal it
The green arrow unfreezes it
The color wheel changes the color of the book
The book icon publishes it so you can not edit it anymore, and you see it how other people see it (Yes like minecraft)
The ‘i’ icon gives you the info I just stated in your chat.

You can’t quite see it here, but the color auto updates as you are changing it, I thought it was cool

A book in editing mode

A published book (This is what other people see even before you’ve published it)


Do whatever with it.

Cool idea and nice work, any link we can download from so we can give you some constructive criticism

Oh yeah I forgot that part ha, yeah it’s edited in now :slight_smile:

Dear god

You need to learn how to use for loops, friend

I couldn’t quite figure out how to get dynamic variables that I could still send and receive data from, so I just wrote it all by hand.

Ugly code and UI could be improved but it’s a nice idea. Props to you.


One question though. Why use buttload of single-line textboxes instead of a large multi-line one?


No need to write LocalPlayer with net messages. Upon receiving a net message, the sending player is a pararemeter -

net.Receive("bookAction", function(len, ply) end)

Don’t be [DEL]Arizard[/DEL] Porma and write LocalPlayer like that because it’s a bad habit to get into and encourages exploits.

I would look up what sequences and series are

How do you make a large multi-line textbox? I couldn’t find a vgui element for that anywhere.

[editline]23rd July 2015[/editline]

I will get to working on that. I’ve had trouble with derma as of recent so spamming LocalPlayer was more or less out of anger, now I just need to get to optimization.

Also for the dynamic variable thing, you could have done:
MenuBase.lines = {}

for i = 1, 20 do
MenuBase.lines* = vgui.Create(“DTextEntry”)


But you wouldn’t need that if you use one multiline DTextEntry anyways

I will look into multiline DTextEntrys, but I tried exactly that code while developing the addon and the MenuBase.lines*:GetValue() always returned nil

I have remade the addon, the link is still
Any more suggestions?

Also thank you so much, I was able to remove 300+ lines of code because of that! :slight_smile:

how to you do to make the aura around the book

Line 17

halo.Add({Target}, Target:GetColor(), 5, 5, 2)

Design is clean but not that appealing, but still a BRILLIANT creation!

I have actually changed the GUI quite a lot since the original post :slight_smile:

You may fork it if you have any GUI suggestions, I’m most likley not going to upload this so if you made changes, and as long as I am accredited, you guys can upload this to the workshop or whatever.

I like your progress with this mod, keep it up.