General > Developers Corner

ULX Staff CHat help?

<< < (3/4) > >>

iViscosity:

--- Quote from: admiralmirage on March 14, 2018, 08:09:04 PM ---This is the EXACT thing I put in there. A copy & paste.

--- Code: --- for i=1, #target_list do
local target = target_list[ i ]
table.insert( strs, plyColor( target, showing_ply ) )
if target == showing_ply then
if not use_self_suffix or calling_ply ~= showing_ply then
                table.insert( strs, showing_ply:Nick() )
else
                table.insert( strs, target:Nick() )
end
elseif not use_self_suffix or calling_ply ~= target_list[ i ] or anonymous then
table.insert( strs, target_list[ i ]:IsValid() and target_list[ i ]:Nick() or "(Console)" )
else
table.insert( strs, target:Nick() )
end
--- End code ---

--- End quote ---
I mean in the asay command.

Sent using Tapatalk. Owner of iViscosity Gaming.

admiralmirage:

--- Code: ---function ulx.asay(calling_ply,message)
local format = "[STAFF] #P: #s"

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 ---

BlueNova:

--- Quote from: admiralmirage on March 14, 2018, 08:09:04 PM ---This is the EXACT thing I put in there. A copy & paste.

--- Code: --- for i=1, #target_list do
local target = target_list[ i ]
table.insert( strs, plyColor( target, showing_ply ) )
if target == showing_ply then
if not use_self_suffix or calling_ply ~= showing_ply then
                table.insert( strs, showing_ply:Nick() )
else
                table.insert( strs, target:Nick() )
end
elseif not use_self_suffix or calling_ply ~= target_list[ i ] or anonymous then
table.insert( strs, target_list[ i ]:IsValid() and target_list[ i ]:Nick() or "(Console)" )
else
table.insert( strs, target:Nick() )
end
--- End code ---

--- End quote ---

May be a silly question to ask. But where did you put this? If it's in the log.lua file did you replace what was originally there around line 370? Or did you just drop in in the file and save it?

admiralmirage:
I replaced the old one, why?

BlueNova:

--- Quote from: admiralmirage on March 14, 2018, 08:20:58 PM ---I replaced the old one, why?

--- End quote ---

Ok, well do you have any errors in your game, either through your console or the server side console?


Because the little snippet I gave you will work. Has worked for me before so must be something that tripped over it's own feet that you'd need to fix.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version