Skip to content
View in the app

A better way to browse. Learn more.

Learn more

day-and-night-lighting/README.txt

README.txt
65 lines · 3.1 KB · Text
Raw
Day And Night Lighting 1.0.0 (olds.ro)
======================================

Switches the light of the whole map between day and night: by an admin
command, by a players' vote at map start, or every round in turn.

Requirements
  - AMX Mod X 1.10 or newer with the fakemeta module (enabled by default)
  - ReAPI (ReGameDLL_CS) for the round restart hook
  - Written for AMX Mod X 1.10.0.5490, ReAPI 5.29.0.358, ReHLDS 3.15.0.896,
    ReGameDLL_CS 5.30.0.814

Install
  1. Compile scripting/olds_daynight.sma with amxxpc 1.10 (with the ReAPI
     include files) and copy olds_daynight.amxx to addons/amxmodx/plugins/.
  2. Copy data/lang/olds_daynight.txt to addons/amxmodx/data/lang/.
  3. Copy configs/plugins/olds_daynight.cfg to addons/amxmodx/configs/plugins/
     (if you skip this, the plugin writes the same file with the defaults on
     its first start).
  4. Add olds_daynight.amxx to addons/amxmodx/configs/plugins.ini.

Admin command (flag "f", ADMIN_MAP, and the server console)
  amx_daynight day      the day light (olds_dn_day)
  amx_daynight night    the night light (olds_dn_night)
  amx_daynight toggle   night if it is day, day if it is night

  - The light changes for everyone at once; chat says who changed it.
  - An admin's choice also ends a running vote.
  - Every change is written to the AMX Mod X log with the admin's name.
  - Admins without the flag are refused and nothing changes.
  - The access flag can be changed in addons/amxmodx/configs/cmdaccess.ini.

Modes (olds_dn_mode)
  0  Only the admin command changes the light.
  1  20 seconds after the map start every player gets a menu: Day or Night.
     The vote is open for 15 seconds; the side with more votes wins. A tie
     (or no votes) leaves the light as it is.
  2  Day and night take turns, one round each. Each change is written to
     the AMX Mod X log, for example: Round 4: night (light style "c").

Server command
  olds_dn_status   prints the mode, the light in use, the vote count and how
                   often the style was sent to joining players

Notes
  - Players who join later see the same light: the plugin sends them the
    style when they enter the game and once more a second later.
  - A new map always starts with its own light; the plugin changes nothing
    until the command, the vote or a new round in mode 2.
  - A style can have several letters ("mmnmmommommnonmmonqnmmo" flickers).
    A cvar value with anything other than letters a to z is not used: the
    default (m for day, c for night) is used instead and the log says so.

Settings (addons/amxmodx/configs/plugins/olds_daynight.cfg)
  olds_dn_mode   0     0 = command only, 1 = vote at map start,
                       2 = day and night every other round
  olds_dn_day    "m"   light style for day (m = normal)
  olds_dn_night  "c"   light style for night (a = darkest, z = brightest)

Texts are in data/lang/olds_daynight.txt (English). Add a section such as
[ro] to translate them. No sounds, models or sprites are used.

Credits and licence
  Written from scratch by alexit (olds.ro workshop) for workshop card LIB-1540.
  Licence: GNU GPL version 3 or later (GPL-3.0-or-later).

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.