y_inttest.inc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*----------------------------------------------------------------------------*-
  2. =================================
  3. y_inttest - Internal test code!
  4. =================================
  5. Description:
  6. Internal test code - do not use...
  7. Legal:
  8. Version: MPL 1.1
  9. The contents of this file are subject to the Mozilla Public License Version
  10. 1.1 (the "License"); you may not use this file except in compliance with
  11. the License. You may obtain a copy of the License at
  12. http://www.mozilla.org/MPL/
  13. Software distributed under the License is distributed on an "AS IS" basis,
  14. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  15. for the specific language governing rights and limitations under the
  16. License.
  17. The Original Code is the SA:MP script information include.
  18. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  19. Portions created by the Initial Developer are Copyright (C) 2008
  20. the Initial Developer. All Rights Reserved.
  21. Contributors:
  22. ZeeX, koolk
  23. Thanks:
  24. Peter, Cam - Support.
  25. ZeeX - Very productive conversations.
  26. koolk - IsPlayerinAreaEx code.
  27. TheAlpha - Danish translation.
  28. breadfish - German translation.
  29. Fireburn - Dutch translation.
  30. yom - French translation.
  31. 50p - Polish translation.
  32. Zamaroht - Spanish translation.
  33. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes
  34. for me to strive to better.
  35. Pixels^ - Running XScripters where the idea was born.
  36. Matite - Pestering me to release it and using it.
  37. Very special thanks to:
  38. Thiadmer - PAWN.
  39. Kye/Kalcor - SA:MP.
  40. SA:MP Team past, present and future - SA:MP.
  41. Version:
  42. 1.0
  43. Changelog:
  44. 29/11/10:
  45. First version
  46. -*----------------------------------------------------------------------------*/
  47. #if !defined _YSI_ALLOW_INTERNAL_TEST
  48. #endinput
  49. #endif
  50. #define MAX_INTERNALX_TEST_ITEMS 42
  51. #define _GROUP_MAKE_NAME_INTTEST<%0...%1> %0InttestX%1
  52. #define _GROUP_MAKE_LIMIT_INTTEST MAX_INTERNALX_TEST_ITEMS
  53. #include <YSI\y_master>
  54. #include <YSI\y_groups>
  55. #include <YSI\y_playerarray>
  56. static
  57. //BitArray:gPlayers[MAX_INTERNALX_TEST_ITEMS]<MAX_PLAYERS>,
  58. PlayerArray:gPlayers[MAX_INTERNALX_TEST_ITEMS]<MAX_PLAYERS>,
  59. gElements[MAX_INTERNALX_TEST_ITEMS] = {-1, ...};
  60. //inttestxxx
  61. //checkpoint
  62. RF:InttestX_Create[i](val)
  63. {
  64. new
  65. i = 0;
  66. while (i != MAX_INTERNALX_TEST_ITEMS && gElements[i] != -1)
  67. {
  68. ++i;
  69. }
  70. if (i == MAX_INTERNALX_TEST_ITEMS)
  71. {
  72. return -1;
  73. }
  74. NO_GROUPS(i)
  75. {
  76. //Bit_SetAll(
  77. PA_Init(gPlayers[i], true, bits<MAX_PLAYERS>);
  78. }
  79. gElements[i] = val;
  80. return i;
  81. }
  82. RF@v:InttestX_SetPlayer[iii](element, playerid, bool:set)
  83. //Inttest_SetPlayer(element, playerid, set)
  84. {
  85. if (set) PA+(gPlayers[element], playerid);
  86. else PA-(gPlayers[element], playerid);
  87. }
  88. #define YSI_GROUPS_LAST 9
  89. #include <YSI\internal\y_grouprevert>