Skip to content

Commit

Permalink
fix: use redm_update_notify only after read it from *.json config (
Browse files Browse the repository at this point in the history
…#132)

* fix: use `redm_update_notify` only after read it from `*.json` config

* Use `redm_update_notify` in `.json` config
  • Loading branch information
SergeyShorokhov authored Jul 22, 2024
1 parent 097ea34 commit 3cd7fb1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions cstrike/addons/amxmodx/configs/redm/gamemode_deathmatch.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@
// Mode title HUD Y position.
"redm_mode_title_hud_y": "0.85",

// Notify for new ReDM update.
"redm_update_notify": "1",

// ReGameDLL Settings
"mp_freeforall": "1",
"bot_deathmatch": "1",
Expand Down
1 change: 1 addition & 0 deletions cstrike/addons/amxmodx/scripting/ReDeathmatch.sma
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public plugin_cfg() {
SetActive(redm_active)
}
CallApi_Initialized()
Updater_Check()
}

public plugin_end() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Updater_Init() {
.has_min = true, .min_val = 0.0,
.has_max = true, .max_val = 1.0,
.flags = _FCVAR_BOOLEAN,
.description = "Notify for new ReDM update.^n\
Don't use into ReDM configs!"
.description = "Notify for new ReDM update."
),
redm_update_notify
)
Expand All @@ -22,8 +21,6 @@ Updater_Init() {
ADMIN_MAP,
"Checks ReDM update."
)

CheckUpdate()
}

public ConCmd_redm_update_check(const player, const level, const commandId) {
Expand Down Expand Up @@ -56,7 +53,7 @@ Updater_Natives() {
return PLUGIN_CONTINUE
}

static CheckUpdate() {
Updater_Check() {
if (!redm_update_notify)
return

Expand Down

0 comments on commit 3cd7fb1

Please sign in to comment.