Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.74 KB | None | 0 0
  1. #include <a_samp>
  2. #include <pawn.cmd>
  3.  
  4. new PlayerText:TD_Health[MAX_PLAYERS];
  5. new PlayerText:TD_Armour[MAX_PLAYERS];
  6. main() {}
  7.  
  8.  
  9. public OnGameModeInit()
  10. {
  11. SetGameModeText(" ");
  12. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  13. return 1;
  14. }
  15.  
  16. public OnGameModeExit()
  17. {
  18. return 1;
  19. }
  20.  
  21. public OnPlayerRequestClass(playerid, classid)
  22. {
  23. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  24. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  25. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  26. SetSpawnInfo(playerid, 0, 292, 0.0, 0.0, 3.0, 0.0, 0, 0, 0, 0, 0, 0);
  27. Show_TD(playerid);
  28. return 1;
  29. }
  30.  
  31. public OnPlayerConnect(playerid)
  32. {
  33. return 1;
  34. }
  35.  
  36. public OnPlayerDisconnect(playerid, reason)
  37. {
  38. return 1;
  39. }
  40.  
  41. public OnPlayerSpawn(playerid)
  42. {
  43. SetPlayerHealth(playerid, 50.0);
  44. SetPlayerArmour(playerid, 50.0);
  45. PlayerTextDrawShow(playerid, TD_Health[playerid]);
  46. PlayerTextDrawShow(playerid, TD_Armour[playerid]);
  47. return 1;
  48. }
  49.  
  50. public OnPlayerDeath(playerid, killerid, reason)
  51. {
  52. return 1;
  53. }
  54.  
  55. public OnVehicleSpawn(vehicleid)
  56. {
  57. return 1;
  58. }
  59.  
  60. public OnVehicleDeath(vehicleid, killerid)
  61. {
  62. return 1;
  63. }
  64.  
  65. public OnPlayerText(playerid, text[])
  66. {
  67. return 1;
  68. }
  69.  
  70. public OnPlayerCommandText(playerid, cmdtext[])
  71. {
  72. return 0;
  73. }
  74.  
  75. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  76. {
  77. return 1;
  78. }
  79.  
  80. public OnPlayerExitVehicle(playerid, vehicleid)
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnPlayerStateChange(playerid, newstate, oldstate)
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnPlayerEnterCheckpoint(playerid)
  91. {
  92. return 1;
  93. }
  94.  
  95. public OnPlayerLeaveCheckpoint(playerid)
  96. {
  97. return 1;
  98. }
  99.  
  100. public OnPlayerEnterRaceCheckpoint(playerid)
  101. {
  102. return 1;
  103. }
  104.  
  105. public OnPlayerLeaveRaceCheckpoint(playerid)
  106. {
  107. return 1;
  108. }
  109.  
  110. public OnRconCommand(cmd[])
  111. {
  112. return 1;
  113. }
  114.  
  115. public OnPlayerRequestSpawn(playerid)
  116. {
  117. return 1;
  118. }
  119.  
  120. public OnObjectMoved(objectid)
  121. {
  122. return 1;
  123. }
  124.  
  125. public OnPlayerObjectMoved(playerid, objectid)
  126. {
  127. return 1;
  128. }
  129.  
  130. public OnPlayerPickUpPickup(playerid, pickupid)
  131. {
  132. return 1;
  133. }
  134.  
  135. public OnVehicleMod(playerid, vehicleid, componentid)
  136. {
  137. return 1;
  138. }
  139.  
  140. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  141. {
  142. return 1;
  143. }
  144.  
  145. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  146. {
  147. return 1;
  148. }
  149.  
  150. public OnPlayerSelectedMenuRow(playerid, row)
  151. {
  152. return 1;
  153. }
  154.  
  155. public OnPlayerExitedMenu(playerid)
  156. {
  157. return 1;
  158. }
  159.  
  160. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  161. {
  162. return 1;
  163. }
  164.  
  165. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  166. {
  167. return 1;
  168. }
  169.  
  170. public OnRconLoginAttempt(ip[], password[], success)
  171. {
  172. return 1;
  173. }
  174.  
  175. public OnPlayerUpdate(playerid)
  176. {
  177. return 1;
  178. }
  179.  
  180. public OnPlayerStreamIn(playerid, forplayerid)
  181. {
  182. return 1;
  183. }
  184.  
  185. public OnPlayerStreamOut(playerid, forplayerid)
  186. {
  187. return 1;
  188. }
  189.  
  190. public OnVehicleStreamIn(vehicleid, forplayerid)
  191. {
  192. return 1;
  193. }
  194.  
  195. public OnVehicleStreamOut(vehicleid, forplayerid)
  196. {
  197. return 1;
  198. }
  199.  
  200. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  201. {
  202. return 1;
  203. }
  204.  
  205. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  206. {
  207. return 1;
  208. }
  209.  
  210. Show_TD(playerid)
  211. {
  212. TD_Health[playerid] = CreatePlayerTextDraw(playerid, 564.333312, 66.385177, " ");
  213. PlayerTextDrawLetterSize(playerid, TD_Health[playerid], 0.254333, 0.923851);
  214. PlayerTextDrawAlignment(playerid, TD_Health[playerid], 1);
  215. PlayerTextDrawColor(playerid, TD_Health[playerid], -1);
  216. PlayerTextDrawSetShadow(playerid, TD_Health[playerid], 0);
  217. PlayerTextDrawBackgroundColor(playerid, TD_Health[playerid], 255);
  218. PlayerTextDrawFont(playerid, TD_Health[playerid], 2);
  219. PlayerTextDrawSetProportional(playerid, TD_Health[playerid], 1);
  220.  
  221. TD_Armour[playerid] = CreatePlayerTextDraw(playerid, 562.999938, 43.570388, " ");
  222. PlayerTextDrawLetterSize(playerid, TD_Armour[playerid], 0.256999, 1.064888);
  223. PlayerTextDrawAlignment(playerid, TD_Armour[playerid], 1);
  224. PlayerTextDrawColor(playerid, TD_Armour[playerid], -16776961);
  225. PlayerTextDrawSetShadow(playerid, TD_Armour[playerid], 0);
  226. PlayerTextDrawBackgroundColor(playerid, TD_Armour[playerid], 255);
  227. PlayerTextDrawFont(playerid, TD_Armour[playerid], 2);
  228. PlayerTextDrawSetProportional(playerid, TD_Armour[playerid], 1);
  229. return 1;
  230. }
  231.  
  232. cmd:hp(playerid, params[])
  233. {
  234. new Float:hp, Float:armour;
  235. new string[5];
  236. GetPlayerHealth(playerid, hp);
  237. GetPlayerArmour(playerid, armour);
  238. format(string, sizeof(string), "%.0f%", hp);
  239. PlayerTextDrawSetString(playerid, TD_Health[playerid], string);
  240. PlayerTextDrawShow(playerid, TD_Health[playerid]);
  241. format(string, sizeof(string), "%.0f%", armour);
  242. PlayerTextDrawSetString(playerid, TD_Armour[playerid], string);
  243. PlayerTextDrawShow(playerid, TD_Armour[playerid]);
  244. return 1;
  245. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement