Advertisement
Guest User

WantedEx.inc

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