Radbox RP chat integration

I’m very much considering running Radbox on my server, but I would like better integration of RP chat.

I’m currently using Mudkipzpwn’s Simple RP chat mod and it works for the most part.
However, in Radbox, players are assigned a secondary name (like Dimitri Sidorow, for example) which really serves no purpose at the moment. The function to find this secondary name (Atleast I believe) is GM:GetPlayerGayName



function GM:GetPlayerGayName( name, isarmy )

	local crc = string.Explode( "", tostring( util.CRC( name ) ) )
	local firstname = PlayerNames[ tonumber( crc[2] ) + 1 ][ tonumber( crc[3] + 1 ) ] 
	local lastname = LastNames[ tonumber( crc[4] ) + 1 ][ tonumber( crc[5] + 1 ) ]
	
	if isarmy then
	
		local tbl = { "Sgt.", "Cpl.", "Lt.", "Pvt." }
	
		firstname = tbl[ math.Clamp( tonumber( crc[6] ), 1, 4 ) ] .. " " .. firstname
	
	end

	return firstname .. " " .. lastname

end

The function for a chat command in the RP chat mod… (/me is the example here)



function ChatMe(ply, args)
	TalkToRange(ply:Name() .. " " .. args, ply:GetPos(), 250)
end
AddChatCmd("/me", ChatMe, "me", "Name hi")


How would I basically “combine” these two functions into one?

so Instead of:

I: /me is cool
O: Cookie is cool

I get:

I: /me is cool
O: Dimitri Sidorow is cool

try ply:Nick() instead of ply:Name()

Ah, no. You see I’m trying to get the radbox name (Gm:GetPlayerGayName) to become the ply:Name in RP chat.

[lua]_R.Player.OldNick = _R.Player.Nick
_R.Player.Nick = GAMEMODE.GetPlayerGayName(_R.Player:OldNick() , false)[/lua]

I’m pretty sure that wouldn’t work.

[lua]_R.Player.OldNick = _R.Player.Nick
function _R.Player:Nick()
return GAMEMODE:GetPlayerGayName(self:OldNick(), false)
end[/lua]

That replaced it in the scoreboard.

I think I need to create a hook that references the function, but one of my friends told me that I couldn’t do that, since the function I’m trying to reference isn’t in shared.lua.

That isn’t what you wanted? Maybe I should read the thread more carefully next time.

I know, it’s a bit hard to understand.

In the chatbox, I want it to print like Tacoscript, with the the RP name (In this case, PlayerGayName) instead of the their actual name.

Wrote it quickly, indeed, it wouldn’t work. I didn’t look at it for long enough to check.