Advertisement
Guest User

Untitled

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