[Pre-Release][0.0.5] Logs system (With UI)

preview

Logs System


Description :

This script allows you to follow what happened in your server directly in game. It logs the connections / disconnections (with the reason), the kills, when a player enter in a blacklisted vehicle and when he takes a blacklisted weapon and a chat log.

Links :

  • Source code can be found here
  • The last release can be found here

Installation :

  1. Download the last release.
  2. Drop the logsystem folder into your resources folder.
  3. Configure the script thanks to the config.lua file.
  4. For chat logs, you’ve got to add a line in the chat script. In the cl_chat.lua file change the chatResult callback to add the logs:logChat trigger as here :
RegisterNUICallback('chatResult', function(data, cb)
  chatInputActive = false
  SetNuiFocus(false)

  if not data.canceled then
    local id = PlayerId()

    --deprecated
    local r, g, b = 0, 0x99, 255

    TriggerServerEvent("logs:logChat", data.message)
    if data.message:sub(1, 1) == '/' then
      ExecuteCommand(data.message:sub(2))
    else
      TriggerServerEvent('_chat:messageEntered', GetPlayerName(id), { r, g, b }, data.message)
    end
  end

  cb('ok')
end)
  1. Add start logsystem into your server.cfg.
  2. Enjoy it !

Changelogs

Version 0.0.5

  • Improved communication between the server and the clients
  • Improved loops (12ms to 0.05/4ms)
  • Removing some unnecessary pieces of code

Version 0.0.4

  • Added darkmode to the UI
  • Added command logs (Have to change the chat script)
  • Added brazilian language thanks to Sattagames

Version 0.0.3

  • Fixed UI issues
  • Allows to rename the script (without capital letters)
  • Added chat logs
  • Added more configurable things (strings/strings.lua)
25 Likes

Got a bug where the UI doesn’t close down properly after pressing the close in the top corner, the interface disappears however the mouse control doesn’t, a quick fix to this would be appreciated

I got the same as @TheSmallerShow

1 Like

Did you rename the resource or not put it directly in /resources? WIth most NUI stuff it needs to be exact.

oh that works for me, i re-named it to log-system, but i changed it to logsystem as original and it works :smiley:

Anything with NUI needs to be named properly (unless the developer is competent)

Do you think you can try to make a chat log along with this

This issue will be corrected in the next release (today), you will be able to rename the script (without capital letters).

Gonna try to add this ! Thanks for the suggestion

1 Like

New version : 0.0.3

  • Fixed UI issues
  • Allows to rename the script (without capital letters)
  • Added chat logs
  • Added more configurable things (strings/strings.lua)

You can download this newest version here

1 Like

add so it loggs if someone give someone items, weapons, money (bank, black and money) ? would be nice :slight_smile:

it’s for each framework different, so you better do that part yourself :slight_smile:

Thank you for taking the time to write an extremely useful script. I’ve noticed that it does not log /ooc messages or any other form of chat messages other than basic chat. Is it possible to include and log these elements so all forms of chat will be logged?

Again thanks and amazing work!

When i try to add an admin it wont work. The Debug works but admin dosn’t have i done something wrong?

Did you start the resource after you were connected ?

It started on server start up but i think i wrote the admin thing wrong. Thanks for the quick help doe :slight_smile:

No problem, enjoy the script ! :slight_smile:

that is actually really cool mate :wink:

Thank you very much ! :smiley:

image
image
??? whitch is the steam id?

The hex. Steam3 ID 64 bit. Bottom one. 110000