CityRP Documentation Repository

cityrp.logs

Serverside logging utility.

Functions

Servercityrp.logs.add(player1, steamid1, player2, steamid2, logtype, value1, value2, value3, value4)Source ☍

Add a raw log to the file. See cityrp.logs.addPly for the ordering convention: the acting player goes first.

Parameters

  • player1(string|number)?The acting player's name.
  • steamid1(string|number)?The acting player's steamid.
  • player2(string|number)?The name of the player acted upon.
  • steamid2(string|number)?The steamid of the player acted upon.
  • logtypestring?The type of log to use.
  • value1(string|number)?The first value to add.
  • value2(string|number)?The second value to add.
  • value3(string|number)?The third value to add.
  • value4(string|number)?The fourth value to add.
Servercityrp.logs.addPly(p1, p2, lType, v1, v2, v3, v4)Source ☍

Add a player-based log to the file. The acting player goes first: the admin control panel reads player1/steamid1 as the actor and staff auditing filters on steamid1, so the reverse order misattributes the action.

Parameters

  • p1PlayerThe player performing the action, written to player1/steamid1.
  • p2Player?The player it is performed on, written to player2/steamid2.
  • lTypestringThe type of log to use.
  • v1anyThe first value to add.
  • v2anyThe second value to add.
  • v3anyThe third value to add.
  • v4anyThe fourth value to add.
Servercityrp.logs.dump()Source ☍

Dump logs to the SQL table.

Tables

Servercityrp.logsSource ☍

Main table for storing log functions.

Servercityrp.logs.logsSource ☍

The stored logs which have yet to be dumped.

Fields

Servercityrp.logs.cleanupranSource ☍

If the log cleanup has been ran.

Servercityrp.logs.propprotectionSource ☍

The prop protection system being used.