1
0

y_automasters.inc 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. /*----------------------------------------------------------------------------*-
  2. ===============================
  3. Y Sever Includes - Master Auto
  4. ===============================
  5. Description:
  6. Attempts to figure out from what library the current instance of the master
  7. system was included from.
  8. Legal:
  9. Version: MPL 1.1
  10. The contents of this file are subject to the Mozilla Public License Version
  11. 1.1 (the "License"); you may not use this file except in compliance with
  12. the License. You may obtain a copy of the License at
  13. http://www.mozilla.org/MPL/
  14. Software distributed under the License is distributed on an "AS IS" basis,
  15. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  16. for the specific language governing rights and limitations under the
  17. License.
  18. The Original Code is the SA:MP script information include.
  19. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  20. Portions created by the Initial Developer are Copyright (C) 2008
  21. the Initial Developer. All Rights Reserved.
  22. Contributors:
  23. ZeeX, koolk
  24. Thanks:
  25. Peter, Cam - Support.
  26. ZeeX - Very productive conversations.
  27. koolk - IsPlayerinAreaEx code.
  28. TheAlpha - Danish translation.
  29. breadfish - German translation.
  30. Fireburn - Dutch translation.
  31. yom - French translation.
  32. 50p - Polish translation.
  33. Zamaroht - Spanish translation.
  34. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes
  35. for me to strive to better.
  36. Pixels^ - Running XScripters where the idea was born.
  37. Matite - Pestering me to release it and using it.
  38. Very special thanks to:
  39. Thiadmer - PAWN.
  40. Kye/Kalcor - SA:MP.
  41. SA:MP Team past, present and future - SA:MP.
  42. Version:
  43. 0.1
  44. Changelog:
  45. 06/08/10:
  46. First version.
  47. Functions:
  48. Public:
  49. -
  50. Core:
  51. -
  52. Stock:
  53. -
  54. Static:
  55. -
  56. Inline:
  57. -
  58. API:
  59. -
  60. Hooks:
  61. -
  62. Callbacks:
  63. -
  64. Definitions:
  65. -
  66. Enums:
  67. -
  68. Macros:
  69. -
  70. Tags:
  71. -
  72. Variables:
  73. Global:
  74. -.
  75. Static:
  76. -
  77. Commands:
  78. -
  79. Compile options:
  80. -
  81. Operators:
  82. -
  83. Natives:
  84. -
  85. -*----------------------------------------------------------------------------*/
  86. // =============================================================================
  87. // =============================================================================
  88. //
  89. // MAKE SURE THE RECALL CODE IN y_groups HAS THE RIGHT NUMBERS - THATS GIVEN
  90. // ODD ERRORS TWICE NOW!!!
  91. //
  92. // =============================================================================
  93. // =============================================================================
  94. #undef _inc_y_automasters
  95. #define _YSIM_USED_AUTO
  96. // Commands are set as master number 25
  97. #if defined _inc_y_commands
  98. #if !defined _YCM_z@ // z is letter 25
  99. #define MASTER 25
  100. #endinput
  101. #endif
  102. #endif
  103. // Groups are set as master number 24
  104. #if defined _inc_y_grouponce
  105. #if !defined _YCM_y@ // y is letter 24
  106. #define MASTER 24
  107. #endinput
  108. #endif
  109. #endif
  110. // Reserve this number (only in terms of not using it).
  111. //#define DEFAULT_USER_COMMAND_MASTER 23
  112. // Classes are set as master number 22
  113. #if defined _inc_y_classes
  114. #if !defined _YCM_w@ // w is letter 22
  115. #define MASTER 22
  116. #endinput
  117. #endif
  118. #endif
  119. // Dialogs are set as master number 23
  120. /*#if defined _inc_y_dialog
  121. #if !defined _YCM_x@ // x is letter 23
  122. #define MASTER 23
  123. #endinput
  124. #endif
  125. #endif*/
  126. // Languages are set as master number 27
  127. /*#if defined _inc_y_languages
  128. #if !defined _YCM_w@ // B is letter 27
  129. #define MASTER 22
  130. #endinput
  131. #endif
  132. #endif
  133. // Players are set as master number 28
  134. #if defined _inc_y_player
  135. #if !defined _YCM_v@ // C is letter 28
  136. #define MASTER 21
  137. #endinput
  138. #endif
  139. #endif
  140. // The help system is set as master number 29
  141. #if defined _inc_y_help
  142. #if !defined _YCM_u@ // D is letter 29
  143. #define MASTER 20
  144. #endinput
  145. #endif
  146. #endif*/
  147. #if defined _YSI_ALLOW_INTERNAL_TEST
  148. #if defined _inc_y_inttest
  149. #if !defined _YCM_j@
  150. #define MASTER 9
  151. #endinput
  152. #endif
  153. #endif
  154. #if defined _inc_y_inttest2
  155. #if !defined _YCM_i@
  156. #define MASTER 8
  157. #endinput
  158. #endif
  159. #endif
  160. #endif
  161. #undef _YSIM_USED_AUTO
  162. // We can't have an auto-incrementing master number as there's no way to
  163. // guarantee that two scripts using the same library will have the same master
  164. // number for that library!
  165. /*#if defined _YCM_z@
  166. #error "Max masters exceeded."
  167. #endif
  168. #if defined _YCM_y@
  169. #define MASTER 25
  170. #endif
  171. #if defined _YCM_x@
  172. #define MASTER 24
  173. #endif
  174. #if defined _YCM_w@
  175. #define MASTER 23
  176. #endif
  177. #if defined _YCM_v@
  178. #define MASTER 22
  179. #endif
  180. #if defined _YCM_u@
  181. #define MASTER 21
  182. #endif
  183. #if defined _YCM_t@
  184. #define MASTER 20
  185. #endif
  186. #if defined _YCM_s@
  187. #define MASTER 19
  188. #endif
  189. #if defined _YCM_r@
  190. #define MASTER 18
  191. #endif
  192. #if defined _YCM_q@
  193. #define MASTER 17
  194. #endif
  195. #if defined _YCM_p@
  196. #define MASTER 16
  197. #endif
  198. #if defined _YCM_o@
  199. #define MASTER 15
  200. #endif
  201. #if defined _YCM_n@
  202. #define MASTER 14
  203. #endif
  204. #if defined _YCM_m@
  205. #define MASTER 13
  206. #endif
  207. #if defined _YCM_l@
  208. #define MASTER 12
  209. #endif
  210. #if defined _YCM_k@
  211. #define MASTER 11
  212. #endif
  213. #if defined _YCM_j@
  214. #define MASTER 10
  215. #endif
  216. #if defined _YCM_i@
  217. #define MASTER 9
  218. #endif
  219. #if defined _YCM_h@
  220. #define MASTER 8
  221. #endif
  222. #if defined _YCM_g@
  223. #define MASTER 7
  224. #endif
  225. #if defined _YCM_f@
  226. #define MASTER 6
  227. #endif
  228. #if defined _YCM_e@
  229. #define MASTER 5
  230. #endif
  231. #if defined _YCM_d@
  232. #define MASTER 4
  233. #endif
  234. #if defined _YCM_c@
  235. #define MASTER 3
  236. #endif
  237. #if defined _YCM_b@
  238. #define MASTER 2
  239. #endif
  240. #if defined _YCM_a@
  241. #define MASTER 1
  242. #endif
  243. #define MASTER 0*/