|
16 | 16 | #include <map_manager_stocks> |
17 | 17 |
|
18 | 18 | /** |
19 | | - * TODO: write this. |
20 | | - * |
21 | | - * @return Map index |
| 19 | + * Get map index in mapslist array. |
| 20 | + * |
| 21 | + * @param map Map name |
| 22 | + * |
| 23 | + * @return Map index or INVALID_MAP_INDEX if map not exist in mapslist |
22 | 24 | */ |
23 | 25 | native mapm_get_map_index(map[]); |
24 | 26 |
|
25 | 27 | /** |
26 | | - * TODO: write this. |
| 28 | + * Get prefix const from core. |
27 | 29 | * |
| 30 | + * @param prefix Prefix string |
| 31 | + * @param len String lenght |
| 32 | + * |
28 | 33 | * @noreturn |
29 | 34 | */ |
30 | 35 | native mapm_get_prefix(prefix[], len); |
31 | 36 |
|
32 | 37 | /** |
33 | | - * TODO: write this. |
| 38 | + * Start vote. |
34 | 39 | * |
| 40 | + * @param type Vote type, use const VOTE_BY_* |
| 41 | + * |
35 | 42 | * @noreturn |
36 | 43 | */ |
37 | 44 | native mapm_start_vote(type); |
38 | 45 |
|
39 | 46 | /** |
40 | | - * TODO: write this. |
| 47 | + * Stop vote. |
41 | 48 | * |
42 | 49 | * @noreturn |
43 | 50 | */ |
44 | 51 | native mapm_stop_vote(); |
45 | 52 |
|
46 | 53 | /** |
47 | | - * TODO: write this. |
| 54 | + * Get votelist size const from core. |
48 | 55 | * |
49 | 56 | * @return Votelist size |
50 | 57 | */ |
51 | 58 | native mapm_get_votelist_size(); |
52 | 59 |
|
53 | 60 | /** |
54 | | - * TODO: write this. |
| 61 | + * Set max items in vote. |
| 62 | + * |
| 63 | + * @param value Amount items in vote |
55 | 64 | * |
56 | 65 | * @noreturn |
57 | 66 | */ |
58 | 67 | native mapm_set_votelist_max_items(value); |
59 | 68 |
|
60 | 69 | /** |
61 | | - * TODO: write this. |
| 70 | + * Push map in votelist. |
| 71 | + * |
| 72 | + * @note Use native in forward mapm_prepare_votelist(). |
| 73 | + * |
| 74 | + * @param map Map name |
| 75 | + * @param type Type for addons |
| 76 | + * @param ignore_check Allow ignore some checks, bit sum, use const CHECK_* |
62 | 77 | * |
63 | | - * @noreturn |
| 78 | + * @return Result of pushing, const PUSH_* |
64 | 79 | */ |
65 | 80 | native mapm_push_map_to_votelist(map[], type = PUSH_BY_NATIVE, ignore_check = CHECK_NOT_IGNORED); |
66 | 81 |
|
67 | 82 | /** |
68 | | - * TODO: write this. |
69 | | - * Use in mapm_analysis_of_results() |
| 83 | + * Get amount maps in votelist. |
| 84 | + * |
| 85 | + * @note Use in mapm_analysis_of_results() |
70 | 86 | * |
71 | 87 | * @noreturn |
72 | 88 | */ |
73 | 89 | native mapm_get_count_maps_in_vote(); |
74 | 90 |
|
75 | 91 | /** |
76 | | - * TODO: write this. |
77 | | - * Use in mapm_analysis_of_results() |
| 92 | + * Get info about votelist item. |
| 93 | + * |
| 94 | + * @note Use in mapm_analysis_of_results() |
| 95 | + * |
| 96 | + * @param item Index in votelist |
| 97 | + * @param map Map name |
| 98 | + * @param len Map name string lenght |
78 | 99 | * |
79 | | - * @return Votes |
| 100 | + * @return Votes |
80 | 101 | */ |
81 | 102 | native mapm_get_voteitem_info(item, map[], len); |
82 | 103 |
|
83 | 104 | /** |
84 | | - * TODO: write this. |
| 105 | + * Returns if vote started. |
85 | 106 | * |
86 | | - * @return true/false |
| 107 | + * @return true/false |
87 | 108 | */ |
88 | 109 | native bool:is_vote_started(); |
89 | 110 |
|
90 | 111 | /** |
91 | | - * TODO: write this. |
| 112 | + * Returns if vote finished. |
92 | 113 | * |
93 | | - * @return true/false |
| 114 | + * @return true/false |
94 | 115 | */ |
95 | 116 | native bool:is_vote_finished(); |
96 | 117 |
|
97 | 118 | /** |
98 | | - * TODO: write this. |
| 119 | + * Called after load maps from file. |
99 | 120 | * |
| 121 | + * @param maplist Array with loaded maps |
| 122 | + * |
100 | 123 | * @noreturn |
101 | 124 | */ |
102 | 125 | forward mapm_maplist_loaded(Array:maplist); |
103 | 126 |
|
104 | 127 | /** |
105 | | - * TODO: write this. |
| 128 | + * Called every second before vote or in vote. |
| 129 | + * |
| 130 | + * @param type Type of countdown, used const COUNTDOWN_* |
| 131 | + * @param time Current second of countdown |
106 | 132 | * |
107 | 133 | * @noreturn |
108 | 134 | */ |
109 | 135 | forward mapm_countdown(type, time); |
110 | 136 |
|
111 | 137 | /** |
112 | | - * TODO: write this. |
| 138 | + * Called before vote. |
| 139 | + * |
| 140 | + * @param type Type of vote, used const VOTE_BY_* |
113 | 141 | * |
114 | 142 | * @noreturn |
115 | 143 | */ |
116 | 144 | forward mapm_prepare_votelist(type); |
117 | 145 |
|
118 | 146 | /** |
119 | | - * TODO: write this. |
| 147 | + * Called when core or addons are trying add map in votelist. |
| 148 | + * |
| 149 | + * @param map Map name |
| 150 | + * @param type Type of vote, used const VOTE_BY_* |
| 151 | + * @param index Index in mapslist array |
120 | 152 | * |
121 | | - * @noreturn |
| 153 | + * @return MAP_ALLOWED |
| 154 | + * MAP_BLOCKED |
122 | 155 | */ |
123 | 156 | forward mapm_can_be_in_votelist(map[], type, index); |
124 | 157 |
|
125 | 158 | /** |
126 | | - * TODO: write this. |
127 | | - * |
128 | | - * @noreturn |
| 159 | + * Called for permission to extend current map. |
| 160 | + * |
| 161 | + * @param type Type of vote, used const VOTE_BY_* |
| 162 | + * |
| 163 | + * @return EXTEND_ALLOWED to allow extend current map |
| 164 | + * EXTEND_BLOCKED to block extend current map |
129 | 165 | */ |
130 | 166 | forward mapm_can_be_extended(type); |
131 | 167 |
|
132 | 168 | /** |
133 | | - * TODO: write this. |
| 169 | + * Called when core start show menu with vote. |
| 170 | + * |
| 171 | + * @param type Type of vote, used const VOTE_BY_* |
134 | 172 | * |
135 | 173 | * @noreturn |
136 | 174 | */ |
137 | 175 | forward mapm_vote_started(type); |
138 | 176 |
|
139 | 177 | /** |
140 | | - * TODO: write this. |
| 178 | + * Called before vote finish. |
| 179 | + * |
| 180 | + * @param type Type of vote, used const VOTE_BY_* |
| 181 | + * @param total_votes Type of vote, used const VOTE_BY_* |
141 | 182 | * |
142 | | - * @noreturn |
| 183 | + * @return ALLOW_VOTE to allow finish vote |
| 184 | + * ABORT_VOTE to block finish vote, forward mapm_vote_finished() will not be called |
143 | 185 | */ |
144 | 186 | forward mapm_analysis_of_results(type, total_votes); |
145 | 187 |
|
146 | 188 | /** |
147 | | - * TODO: write this. |
| 189 | + * Called when vote finished. |
| 190 | + * |
| 191 | + * @note Can be blocked in forward mapm_analysis_of_results() |
| 192 | + * |
| 193 | + * @param map Type of vote, used const VOTE_BY_* |
| 194 | + * @param type Type of vote, used const VOTE_BY_* |
| 195 | + * @param total_votes Type of vote, used const VOTE_BY_* |
148 | 196 | * |
149 | 197 | * @noreturn |
150 | 198 | */ |
|
0 commit comments