DarkRP Chat Help.

Well, as you may or may not know, the older versions of DarkRP register things weird and chat won’t display in a console readout, ie HLSW.

I’m using the older version for simplicity reasons, so I figured an easy fix is to move over the chat.lua file from the new version. I can now see the chat in the console, with one teensy problem.

RP commands (/cp and such) are broken, and I get the error Lua Error: ERROR: GAMEMODE:‘PlayerSay’ Failed: [gamemodes/DarkRP/gamemode/sv_gamemode_functions.lua:619] attempt to call global ‘RP_PlayerChat’ (a nil value)

The section of code from there is…


local otherhooks = {}
function GM:PlayerSay(ply, text)--We will make the old hooks run AFTER DarkRP's playersay has been run.
 local text2 = text
 local callback
 text2, callback = RP_PlayerChat(ply, text2)    <---------- LINE 619 <--------- <-----------
 if tostring(callback) ~= "" then return "" end
 for k,v in SortedPairs(otherhooks, false) do
  if type(v) == "function" then
   text2 = v(ply, text2) or text2
  end
 end
 text2 = RP_ActualDoSay(ply, text2, callback) 
 return ""
end

Anyone have a clue as to how I could fix this?

Why just not use newest revision/version of DarkRP then?

Because there are a lot of things I don’t like about it and it is easier to modify this old version the way I want than modify the new version.

The problem is that you’re missing the function “RP_PlayerChat”