y_classgroups.inc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*----------------------------------------------------------------------------*-
  2. =======================================
  3. y_classes - Advanced class selection!
  4. =======================================
  5. Description:
  6. Allows for advanced class selection options such as skins only certain
  7. people can see and actually removing skins from class selection.
  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. stock Class_ResolveGroups(class, Group:forgroup, bool:cp) <YSI_has_groups:y>
  49. {
  50. P:3("Class_AddClass<y>: call Resolve %d %d %d", class, forgroup, cp);
  51. if (cp)
  52. {
  53. // Here "class" means "playerid".
  54. Group_SetPlayer(forgroup, class, true);
  55. }
  56. else
  57. {
  58. // Only enable this class for one group.
  59. Group_UpdateAllClass(class, false);
  60. Group_SetClass(forgroup, class, true);
  61. }
  62. }