• [ooc] custom color
    5 replies, posted
how to make brackets in white, advert,ooc in red I tried to change the color of ooc in sv_chatcommands.lua but it paints over the brackets ooc and nickname in red here is the team that is responsible for this: DarkRP.talkToPerson(v, col, "(" .. phrase .. ") " .. name, col2, text, ply) localfunction OOC(ply, args)ifnot GAMEMODE.Config.ooc then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("disabled", DarkRP.getPhrase("ooc"), "")) return""endlocal DoSay = function(text)if text == ""then DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", "")) return""endlocal col = team.GetColor(ply:Team()) local col2 = Color(255, 255, 255, 255) ifnot ply:Alive() then col2 = Color(255, 200, 200, 255) col = col2 endlocal phrase = DarkRP.getPhrase("ooc") local name = ply:Nick() for _, v inipairs(player.GetAll()) do DarkRP.talkToPerson(v, col, "(" .. phrase .. ") " .. name, col2, text, ply) endendreturn args, DoSay end DarkRP.defineChatCommand("/", OOC, true, 1.5) DarkRP.defineChatCommand("a", OOC, true, 1.5) DarkRP.defineChatCommand("ooc", OOC, true, 1.5)
If the player is not alive it should paint the OOC in red, and if the player is alive it should paint it white, you can make them both red by changing to local col2 = Color(255, 200, 200, 255)
You misunderstood me, ooc now looks like this: https://files.facepunch.com/forum/upload/308695/47d47cb6-75f3-49af-b1d7-a7a53dbd3c48/Безымянн44ый.png I have to do this( repainted this picture through photoshop) https://files.facepunch.com/forum/upload/308695/fedaca22-a525-447e-8c47-9f8b4c83a43a/Безымянн441ый.png but I don’t know how to repaint the brackets, if I start repainting, it paints everything in one color
Try this, not tested it though myself. DarkRP.talkToPerson(v, Color( 255,255,255 ), "(" .. phrase .. ") " .. name, col2, text, ply) And keep the other code as you had it
that will change the whole color, because of the color variable before the phrase. it's a pretty simple function, it takes a color applies that to the first text, then take a second color and applies that color to the second text. looking at the darkrp wiki, you'd have to redefine the function in a darkrp module using darkrpmodification.
Can you tell me exactly how to do this? I haven't been able to set it up for a month. I'm not very good at lua
Sorry, you need to Log In to post a reply to this thread.