Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <amxmodx> | ||
#include <map_manager> | ||
|
||
#define PLUGIN "Map Manager: Priority" | ||
#define VERSION "0.0.1" | ||
#define AUTHOR "Mistrick" | ||
|
||
#pragma semicolon 1 | ||
|
||
new Array:g_aMapList; | ||
|
||
public plugin_init() | ||
{ | ||
register_plugin(PLUGIN, VERSION, AUTHOR); | ||
} | ||
|
||
public mapm_maplist_loaded(Array:maplist, const nextmap[]) | ||
{ | ||
g_aMapList = maplist; | ||
} | ||
|
||
public mapm_can_be_in_votelist(const map[], type, index) | ||
{ | ||
new map_info[MapStruct]; | ||
ArrayGetArray(g_aMapList, index, map_info); | ||
new rnd = random_num(0, 99); | ||
|
||
return rnd < map_info[MapPriority] ? MAP_ALLOWED : MAP_BLOCKED; | ||
} |