Advertisement
Guest User

Untitled

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