1
0

y_extra_languages.inc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #if defined _INC_y_extra_languages
  2. #endinput
  3. #endif
  4. #define _INC_y_extra_languages
  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 pretty much 90% of YSI in one fell swoop!
  69. loadtext core[ysi_langs];
  70. YCMD:language(playerid, params[], help)
  71. {
  72. if (help)
  73. {
  74. Text_Send(playerid, $YSI_LANGS_HELP);
  75. }
  76. else
  77. {
  78. new
  79. lang;
  80. if (sscanf(params, "i", lang))
  81. {
  82. new
  83. c = _:Langs_GetLanguageCount(),
  84. Language:i = Language:0;
  85. while (c)
  86. {
  87. new
  88. code[3];
  89. strcpy(code, Langs_GetCode(i));
  90. if (!isnull(code))
  91. {
  92. // They may not be in order.
  93. Text_Send(playerid, $YSI_LANGS_DISP, _:i, Langs_GetName(i), code);
  94. --c;
  95. }
  96. ++i;
  97. }
  98. Text_Send(playerid, $YSI_LANGS_SET, YCMD:language);
  99. }
  100. else if (Langs_SetPlayerLanguage(playerid, Language:lang) == NO_LANGUAGE)
  101. {
  102. Text_Send(playerid, $YSI_LANGS_INV);
  103. }
  104. else
  105. {
  106. Text_Send(playerid, $YSI_LANGS_DONE, lang, Langs_GetName(Language:lang));
  107. }
  108. }
  109. return 1;
  110. }