-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Hedgefog/master
add version and game description
- Loading branch information
Showing
5 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
### ❄ Snow Wars mod for Counter-Strike 1.6 | ||
__Version:__ 0.9.0 (Alpha) | ||
__Version:__ 0.9.1 (Alpha) | ||
|
||
### 📄 About | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SW_TITLE "Snow Wars" | ||
#define SW_VERSION "0.9.0" | ||
#define SW_VERSION "0.9.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
#pragma semicolon 1 | ||
|
||
#include <amxmodx> | ||
#include <fakemeta> | ||
#include <snowwars> | ||
|
||
#define PLUGIN "Snow Wars" | ||
#define VERSION SW_VERSION | ||
#define AUTHOR "Hedgehog Fog" | ||
|
||
new g_pCvarVersion; | ||
|
||
public plugin_init() { | ||
register_plugin(PLUGIN, VERSION, AUTHOR); | ||
|
||
register_forward(FM_GetGameDescription, "OnGetGameDescription"); | ||
|
||
g_pCvarVersion = register_cvar("snowwars_version", VERSION, FCVAR_SERVER); | ||
hook_cvar_change(g_pCvarVersion, "OnVersionCvarChange"); | ||
} | ||
|
||
public plugin_natives() { | ||
register_library("snowwars"); | ||
} | ||
|
||
public OnVersionCvarChange() { | ||
set_pcvar_string(g_pCvarVersion, SW_VERSION); | ||
} | ||
|
||
public OnGetGameDescription() { | ||
static szGameName[32]; | ||
format(szGameName, charsmax(szGameName), "%s %s", SW_TITLE, SW_VERSION); | ||
forward_return(FMV_STRING, szGameName); | ||
|
||
return FMRES_SUPERCEDE; | ||
} |