y_groupsingle.inc 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*----------------------------------------------------------------------------*-
  2. =======================================
  3. y_groups - Player group abstractions!
  4. =======================================
  5. Description:
  6. Admin levels, gangs, teams etc - they're all "groups" of people, this
  7. provides an abstraction for all of these collections.
  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. 1.0
  44. Changelog:
  45. 29/11/10:
  46. First version
  47. -*----------------------------------------------------------------------------*/
  48. #undef _inc_y_groupsingle
  49. //#undef GROUP_LOCAL
  50. //#undef Group
  51. /*#if YSIM_HAS_MASTER
  52. #if YSIM_IS_CLIENT
  53. //#define Group:%0_InitialiseFromGroups(%1)
  54. stock _GROUP_INITIALISE(x) <YSI_has_groups:n>
  55. {
  56. #pragma unused x
  57. }
  58. stock _GROUP_INITIALISE(x) <>
  59. {
  60. #pragma unused x
  61. }
  62. #else
  63. #if YSIM_IS_SERVER
  64. //#define Group:%0_InitialiseFromGroups(%1) forward _GROUP_INITIALISE(x);_GROUP_INITIALISE(%1)<YSI_has_groups:n>__GROUP_INITIALISE(%1);_GROUP_INITIALISE(%1)<>__GROUP_INITIALISE(%1);static stock __GROUP_INITIALISE(%1)
  65. stock bool:_GROUP_INITIALISE(x) <YSI_has_groups:n>
  66. {
  67. #pragma unused x
  68. return false;
  69. }
  70. stock bool:_GROUP_INITIALISE(x) <>
  71. {
  72. #pragma unused x
  73. return false;
  74. }
  75. #else
  76. #if YSIM_IS_STUB
  77. #error y_groupsingle called with YSIM_IS_STUB.
  78. #else
  79. //#define Group:%0_InitialiseFromGroups(%1) forward _GROUP_INITIALISE(x);_GROUP_INITIALISE(%1)<YSI_has_groups:n>__GROUP_INITIALISE(%1);_GROUP_INITIALISE(%1)<>__GROUP_INITIALISE(%1);static stock __GROUP_INITIALISE(%1)
  80. #endif
  81. #endif
  82. #endif
  83. #else
  84. //#define Group:%0_InitialiseFromGroups(%1) forward _GROUP_INITIALISE(x);_GROUP_INITIALISE(%1)<YSI_has_groups:n>__GROUP_INITIALISE(%1);_GROUP_INITIALISE(%1)<>__GROUP_INITIALISE(%1);static stock __GROUP_INITIALISE(%1)
  85. #endif*/
  86. #if !defined _YSI_HAS_GROUP_SYSTEM
  87. forward bool:_GROUP_INITIALISE(x = _GROUP_MAKE_LIMIT);
  88. #endif
  89. stock bool:_GROUP_INITIALISE(x = _GROUP_MAKE_LIMIT) <YSI_has_groups:n>
  90. {
  91. #pragma unused x
  92. return false;
  93. }
  94. stock bool:_GROUP_INITIALISE(x = _GROUP_MAKE_LIMIT) <>
  95. {
  96. #pragma unused x
  97. return false;
  98. }