Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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