General > Developers Corner
ULX Staff CHat help?
admiralmirage:
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: ---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
--- End code ---
The input was @Test, the output is
--- Code: ---[STAFF] You:
--- End code ---
The message just... doesnt show up. What I want it to say is
--- Code: ---[STAFF] Admiral Mirage: Test
--- End code ---
but 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
[0] Board index
Go to full version