Author Topic: ULX Staff CHat help?  (Read 4423 times)

0 Members and 1 Guest are viewing this topic.

Offline admiralmirage

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
ULX Staff CHat help?
« on: March 14, 2018, 07:26:20 PM »
Hey Ulysses!
I went to Facepunch with this problem, but we seem to be having trouble!
I want to change the Staff Chat (@<message> for staff) and so far, we have
Code: [Select]
function ulx.asay(calling_ply,message)
local format = "[STAFF] #P: #s"
message = message:sub(calling_ply:Nick():len() + 1)

local players = player.GetAll()
for i=#players, 1, -1 do
local v = players[ i ]
if not ULib.ucl.query( v, seeasayAccess ) and v ~= calling_ply then -- Calling player always gets to see the echo
table.remove( players, i )
end
end

ulx.fancyLog( players, format, calling_ply, message )
end

The input was @Test, the output is
Code: [Select]
[STAFF] You:
The message just... doesnt show up. What I want it to say is
Code: [Select]
[STAFF] Admiral Mirage: Testbut replace Admiral Mirage with whatever user typed @test

What is the problem? How do I fix?

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given