How do I move the position of the lockdown text? As seen in this screenshot it is overlapping the chatbox. Editing default darkrp can be done if I have to. I also want the initial lockdown sound to loop every couple minutes while the lockdown is active.
You will have to set this to false https://github.com/FPtje/darkrpmodification/blob/master/lua/darkrp_modules/hudreplacement/cl_hudreplacement.lua#L8 and then draw your own lockdown text, along with the other default stuff
Really? I don’t want to do ALL of that. Can’t I just somehow copy all the default stuff and make a new lockdown text or something?
[editline]21st September 2015[/editline]
I found it here, but I don’t know how to edit this to make it lower. Don’t yell at me for editing DarkRP, I just simply cant remake the entire HUD and this is easier.
It is drawing the text at (I assume) the default darkRP chatbox position, with the y position being offset by 1/4th of the screen height.
In the code you posted in an image (next time please paste it in), chbxX is the x position, and chboxY+chatBoxSize is the y position. Since it seems like these variables don’t correlate to your custom chat box at all, I would recommend just setting them to some numbers that don’t overlap your chatbox.
Please, do not edit core files. The same file that you found that code in contains the code for all the default HUD items. Set the variable to false I previously told you to do, see what HUD items are missing and then copy from https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/hud/cl_hud.lua into https://github.com/FPtje/darkrpmodification/blob/master/lua/darkrp_modules/hudreplacement/cl_hudreplacement.lua
An easy solution would be to replace chat.GetChatBoxPos and chat.GetChatBoxSize, so that it reflects the size of your actual chatbox.
How exactly this is done depends on the chatbox that you are using.
If you didn’t make it and have no clue - you can ask the developer of the chatbox to add this functionality (it should’ve been there in the first place)
Alternatively, if this chatbox is publicly available, if you told us what it is, someone here could give you a working solution.
Nvm, this won’t work. For some reason I assumed DarkRP uses chat.GetChatBoxSize to get it’s size, but it doesn’t. Your best bet is modifying DarkRP code, ideally doing what smithy suggested.
Alternatively, you could edit the chatbox to move it higher.
Personally, I would make DarkRP use chat.GetChatBoxSize
local chatBoxSize = math.floor(Scrh / 4)
local _, chatBoxSize = chat.GetChatBoxSize()
If this doesn’t work, then change this value to something else.