y_races_entry.inc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. #if defined _INC_y_races
  2. #endinput
  3. #endif
  4. #define _INC_y_races
  5. /*
  6. Legal:
  7. Version: MPL 1.1
  8. The contents of this file are subject to the Mozilla Public License Version
  9. 1.1 the "License"; you may not use this file except in compliance with
  10. the License. You may obtain a copy of the License at
  11. http://www.mozilla.org/MPL/
  12. Software distributed under the License is distributed on an "AS IS" basis,
  13. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  14. for the specific language governing rights and limitations under the
  15. License.
  16. The Original Code is the YSI framework.
  17. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  18. Portions created by the Initial Developer are Copyright C 2011
  19. the Initial Developer. All Rights Reserved.
  20. Contributors:
  21. Y_Less
  22. koolk
  23. JoeBullet/Google63
  24. g_aSlice/Slice
  25. Misiur
  26. samphunter
  27. tianmeta
  28. maddinat0r
  29. spacemud
  30. Crayder
  31. Dayvison
  32. Ahmad45123
  33. Zeex
  34. irinel1996
  35. Yiin-
  36. Chaprnks
  37. Konstantinos
  38. Masterchen09
  39. Southclaws
  40. PatchwerkQWER
  41. m0k1
  42. paulommu
  43. udan111
  44. Thanks:
  45. JoeBullet/Google63 - Handy arbitrary ASM jump code using SCTRL.
  46. ZeeX - Very productive conversations.
  47. koolk - IsPlayerinAreaEx code.
  48. TheAlpha - Danish translation.
  49. breadfish - German translation.
  50. Fireburn - Dutch translation.
  51. yom - French translation.
  52. 50p - Polish translation.
  53. Zamaroht - Spanish translation.
  54. Los - Portuguese translation.
  55. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes for
  56. me to strive to better.
  57. Pixels^ - Running XScripters where the idea was born.
  58. Matite - Pestering me to release it and using it.
  59. Very special thanks to:
  60. Thiadmer - PAWN, whose limits continue to amaze me!
  61. Kye/Kalcor - SA:MP.
  62. SA:MP Team past, present and future - SA:MP.
  63. Optional plugins:
  64. Gamer_Z - GPS.
  65. Incognito - Streamer.
  66. Me - sscanf2, fixes2, Whirlpool.
  67. */
  68. #include "..\..\YSI_Core\y_utils"
  69. #if !defined YSI_NO_RACE_POSITION && !defined RACE_POSITION
  70. #define RACE_POSITION
  71. #endif
  72. #if defined YSI_TESTS
  73. #define _Y_RACES_STATIC
  74. #else
  75. #define _Y_RACES_STATIC static
  76. #endif
  77. #include "..\..\YSI_Players\y_text"
  78. #include "..\..\YSI_Data\y_bit"
  79. #include "..\..\YSI_Data\y_iterate"
  80. #include "..\..\YSI_Data\y_playerarray"
  81. #if defined RACE_POSITION
  82. #include "..\..\YSI_Coding\y_timers"
  83. #endif
  84. #if !defined MAX_RACES
  85. #define MAX_RACES 16
  86. #endif
  87. #define Y_RACES_GROUP_NAME<%0...%1> %0Race%1
  88. #define Y_RACES_GROUP_LIMIT MAX_RACES
  89. #define Y_RACES_GROUP_TAG _
  90. #include "..\..\YSI_Players\y_groups\y_groups__include"
  91. #define MASTER 53
  92. #define YSIM_U_DISABLE
  93. #include "..\..\YSI_Core\y_master"
  94. #include "..\..\YSI_Coding\y_hooks"
  95. stock _YSI_HAS_y_races(_do_not_call_me_ever_, _like_never_)
  96. {
  97. P:E("You called _YSI_HAS_y_races! Bad, don't do that!", _do_not_call_me_ever_, _like_never_);
  98. assert(false);
  99. return 0;
  100. }
  101. forward Race_Create(laps = 0, entry = 0, countdown = 3, bool:arial = false, bool:fixedPrize = true, exitTime = 0, interior = 0, world = 0, bool:restart = false);
  102. forward Race_Destroy(slot, bool:refund = false);
  103. FOREIGN__ Race_AddCheckpoint(raceid, Float:x, Float:y, Float:z);
  104. FOREIGN__ Race_AddStart(raceid, Float:x, Float:y, Float:z, Float:a);
  105. FOREIGN__ void:Race_SetFixedWin(raceid, set);
  106. FOREIGN__ void:Race_SetRestart(raceid, set);
  107. FOREIGN__ void:Race_SetArial(raceid, set);
  108. FOREIGN__ void:Race_SetCountdown(raceid, countdown);
  109. FOREIGN__ void:Race_SetInterior(raceid, interior);
  110. FOREIGN__ void:Race_SetWorld(raceid, world);
  111. FOREIGN__ void:Race_SetPrize(raceid, position, amount);
  112. FOREIGN__ void:Race_SetExitTime(raceid, time);
  113. FOREIGN__ Race_IsActive(raceid);
  114. FOREIGN__ void:Race_SetLaps(raceid, laps);
  115. FOREIGN__ void:Race_SetEntry(raceid, cost);
  116. FOREIGN__ Race_GetPlayerExitedTime(playerid);
  117. FOREIGN__ Race_PlayerJoin(playerid, race);
  118. forward Race_PlayerLeave(playerid, bool:refund = false);
  119. FOREIGN__ Race_Start(race);
  120. FOREIGN__ Race_GetPlayerPosition(playerid);
  121. FOREIGN__ Race_GetPlayerRaceTime(playerid);
  122. FOREIGN__ Race_GetPlayerRace(playerid);
  123. FOREIGN__ Race_SetPlayer(race, playerid, bool:set);
  124. #include "y_races_impl"
  125. #if defined YSI_TESTS
  126. #include "y_races_tests"
  127. // Get some new IDs.
  128. #endif
  129. //#undef _GROUP_MAKE_LIMIT
  130. //#undef _GROUP_MAKE_NAME
  131. #include "..\..\YSI_Core\y_master"