How to add notification in admin chat?

My idea was to add notfication in admin chat when someone during frozen leaves server, would be thankful is somebody can write an example for me :slight_smile:
Im using ulx so it should be something like “ulx asay”

If the server is frozen, there wouldn’t be a way of detecting a player leaving.

I think he means when a player cant move (ulx freeze command)

Ah ok, I can write pseudo code for him, but I’m not up to scratch with ULX so someone will have to fill in the blanks.

[lua]

local function ULX_AdminNotification( Arg ) – I don’t know what the actual function is, let’s pretend it’s a virtual void
game.ConsoleCommand( “ulx asay “” … Arg … “”” )
end

hook.Add( “PlayerDisconnected”, “FrozenNotification”, function( ePlayer )
if ( ePlayer:IsFrozen() ) then – Is that what ULX uses to freeze players?
ULX_AdminNotification( string.format( “Player %s left the server while frozen”, ePlayer:Name() ) )
end
end)
[/lua]

Thank you so much <3
any reccomendation where this script should be placed?

Serverside. As I said though, this is pseudo code, there is a good chance it will work, but I couldn’t be bothered searching the ULX documentation for the functions. It is only an example, as you asked for.