Advertisement
Guest User

WantedEx.inc

a guest
Aug 8th, 2016
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. /*------------------------||
  2. || Author: Whatname ||
  3. || Created: 08/08/2016 ||
  4. *///----------------------||
  5.  
  6. #if defined _WantedEx_included
  7. #endinput
  8. #define _WantedEx_included
  9. #endif
  10.  
  11. /*
  12. native SetPlayerWantedLevelEx(playerid, color, pos, wanted);
  13. native DisablePlayerWantedLevelEx(playerid);
  14. native GetPlayerWantedLevelEx(playerid);
  15. */
  16.  
  17. new PlayerText:a_samp_wantedlvl;
  18.  
  19. new a_samp_pwantedlvl[MAX_PLAYERS];
  20.  
  21. #define WANTED_UP_LEFT 0
  22. #define WANTED_DOWN_LEFT 2
  23. #define WANTED_UP_RIGHT 1
  24. #define WANTED_DOWN_RIGHT 3
  25.  
  26. stock SetPlayerWantedLevelEx(playerid, color, pos, wanted)
  27. {
  28. a_samp_pwantedlvl[playerid] = wanted;
  29. switch(pos)
  30. {
  31. case 0:
  32. {
  33. PlayerTextDrawDestroy(playerid, a_samp_wantedlvl);
  34. a_samp_wantedlvl = CreatePlayerTextDraw(playerid, 10.000000, 100.000000, " ");
  35. PlayerTextDrawFont(playerid, a_samp_wantedlvl, 2);
  36. PlayerTextDrawLetterSize(playerid, a_samp_wantedlvl, 0.400000, 0.500000);
  37. PlayerTextDrawSetOutline(playerid, a_samp_wantedlvl, 0);
  38. PlayerTextDrawSetShadow(playerid, a_samp_wantedlvl, 1);
  39. PlayerTextDrawColor(playerid, a_samp_wantedlvl, color);
  40. PlayerTextDrawSetProportional(playerid, a_samp_wantedlvl, 1);
  41. PlayerTextDrawShow(playerid, a_samp_wantedlvl);
  42. if(wanted < 1 || wanted > 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, " ");
  43. if(wanted == 1) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[]~l~[][][][][]");
  44. if(wanted == 2) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][]~l~[][][][]");
  45. if(wanted == 3) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][]~l~[][][]");
  46. if(wanted == 4) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][]~l~[][]");
  47. if(wanted == 5) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][]~l~[]");
  48. if(wanted == 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][][]");
  49. }
  50. case 1:
  51. {
  52. PlayerTextDrawDestroy(playerid, a_samp_wantedlvl);
  53. a_samp_wantedlvl = CreatePlayerTextDraw(playerid, 470.000000, 100.000000, " ");
  54. PlayerTextDrawFont(playerid, a_samp_wantedlvl, 2);
  55. PlayerTextDrawLetterSize(playerid, a_samp_wantedlvl, 0.400000, 0.500000);
  56. PlayerTextDrawSetOutline(playerid, a_samp_wantedlvl, 0);
  57. PlayerTextDrawSetShadow(playerid, a_samp_wantedlvl, 1);
  58. PlayerTextDrawColor(playerid, a_samp_wantedlvl, color);
  59. PlayerTextDrawSetProportional(playerid, a_samp_wantedlvl, 1);
  60. PlayerTextDrawShow(playerid, a_samp_wantedlvl);
  61. if(wanted < 1 || wanted > 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, " ");
  62. if(wanted == 1) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[]~l~[][][][][]");
  63. if(wanted == 2) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][]~l~[][][][]");
  64. if(wanted == 3) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][]~l~[][][]");
  65. if(wanted == 4) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][]~l~[][]");
  66. if(wanted == 5) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][]~l~[]");
  67. if(wanted == 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][][]");
  68. }
  69. case 2:
  70. {
  71. PlayerTextDrawDestroy(playerid, a_samp_wantedlvl);
  72. a_samp_wantedlvl = CreatePlayerTextDraw(playerid, 10.000000, 430.000000, " ");
  73. PlayerTextDrawFont(playerid, a_samp_wantedlvl, 2);
  74. PlayerTextDrawLetterSize(playerid, a_samp_wantedlvl, 0.400000, 0.500000);
  75. PlayerTextDrawSetOutline(playerid, a_samp_wantedlvl, 0);
  76. PlayerTextDrawSetShadow(playerid, a_samp_wantedlvl, 1);
  77. PlayerTextDrawColor(playerid, a_samp_wantedlvl, color);
  78. PlayerTextDrawSetProportional(playerid, a_samp_wantedlvl, 1);
  79. PlayerTextDrawShow(playerid, a_samp_wantedlvl);
  80. if(wanted < 1 || wanted > 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, " ");
  81. if(wanted == 1) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[]~l~[][][][][]");
  82. if(wanted == 2) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][]~l~[][][][]");
  83. if(wanted == 3) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][]~l~[][][]");
  84. if(wanted == 4) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][]~l~[][]");
  85. if(wanted == 5) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][]~l~[]");
  86. if(wanted == 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][][]");
  87. }
  88. case 3:
  89. {
  90. PlayerTextDrawDestroy(playerid, a_samp_wantedlvl);
  91. a_samp_wantedlvl = CreatePlayerTextDraw(playerid, 470.000000, 430.000000, " ");
  92. PlayerTextDrawFont(playerid, a_samp_wantedlvl, 2);
  93. PlayerTextDrawLetterSize(playerid, a_samp_wantedlvl, 0.400000, 0.500000);
  94. PlayerTextDrawSetOutline(playerid, a_samp_wantedlvl, 0);
  95. PlayerTextDrawSetShadow(playerid, a_samp_wantedlvl, 1);
  96. PlayerTextDrawColor(playerid, a_samp_wantedlvl, color);
  97. PlayerTextDrawSetProportional(playerid, a_samp_wantedlvl, 1);
  98. PlayerTextDrawShow(playerid, a_samp_wantedlvl);
  99. if(wanted < 1 || wanted > 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, " ");
  100. if(wanted == 1) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[]~l~[][][][][]");
  101. if(wanted == 2) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][]~l~[][][][]");
  102. if(wanted == 3) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][]~l~[][][]");
  103. if(wanted == 4) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][]~l~[][]");
  104. if(wanted == 5) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][]~l~[]");
  105. if(wanted == 6) return PlayerTextDrawSetString(playerid, a_samp_wantedlvl, "[][][][][][]");
  106. }
  107. default: PlayerTextDrawSetString(playerid, a_samp_wantedlvl, " ");
  108. }
  109. return pos;
  110. }
  111.  
  112. stock DisablePlayerWantedLevelEx(playerid)
  113. {
  114. PlayerTextDrawDestroy(playerid, a_samp_wantedlvl);
  115. a_samp_pwantedlvl[playerid] = 0;
  116. return 1;
  117. }
  118.  
  119. stock GetPlayerWantedLevelEx(playerid)
  120. {
  121. return a_samp_pwantedlvl[playerid];
  122. }
  123.  
  124. /*------------------------||
  125. || Author: Whatname ||
  126. || Created: 08/08/2016 ||
  127. *///----------------------||
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement