Alright so I have a roll command that I found that works perfectly. Only problem that I have with it is that players can use /me to make it look like they won. I want it to say [Roll] before the nickname, and I haven’t been able to get it working. I am using the darkrp base for the code.
Here’s what it looks like on its own: General Guy has rolled a 91.
I want to change it to where it looks like [Roll] General Guy has rolled a 91.
Yes, the core darkrp files were edited for this. Can anyone provide a solution for me?
local function Roll(ply, args) local DoSay = function() if GAMEMODE.Config.alltalk then for _, target in pairs(player.GetAll()) do DarkRP.talkToPerson(target, team.GetColor(ply:Team()), "[Roll]"..ply:Nick().." has rolled a "..math.random(1,100)..".") end else DarkRP.talkToRange(ply, "[Roll]"..ply:Nick().." has rolled a "..math.random(1,100)..".", "", 250) end end return args, DoSay end DarkRP.defineChatCommand("roll", Roll, 1.5)