Guest User

Textdraws instead of GameTextForPlayer - Jack Leslie

a guest
May 11th, 2012
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.80 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. #include <a_samp>
  3. new Text:DescriptionText[MAX_PLAYERS];
  4. new DescriptionTimer[MAX_PLAYERS];
  5.  
  6. stock ShowDescriptionText(playerid, string[])
  7. {
  8.     KillTimer(DescriptionTimer[playerid]);
  9.     TextDrawSetString(DescriptionText[playerid], string);
  10.     TextDrawShowForPlayer(playerid, DescriptionText[playerid]);
  11.     DescriptionTimer[playerid] = SetTimerEx("HideDescriptionText", 5000, 0, "i", playerid);
  12.     return 1;
  13. }
  14.  
  15. public OnFilterScriptInit()
  16. {
  17.     print("*****************************");
  18.     print("  A tutorial by Jack Leslie  ");
  19.     print("*****************************");
  20.     return 1;
  21. }
  22.  
  23. public OnFilterScriptExit()
  24. {
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerRequestClass(playerid, classid)
  29. {
  30.     return 1;
  31. }
  32.  
  33. public OnPlayerConnect(playerid)
  34. {
  35.     DescriptionText[playerid] = TextDrawCreate(320.0, 380.0, " ");
  36.     TextDrawAlignment(DescriptionText[playerid], 2);
  37.     TextDrawFont(DescriptionText[playerid], 1);
  38.     TextDrawLetterSize(DescriptionText[playerid], 0.320000, 1.700000);
  39.     TextDrawSetOutline(DescriptionText[playerid], 1);
  40.     TextDrawHideForPlayer(playerid, DescriptionText[playerid]);
  41.     return 1;
  42. }
  43.  
  44. public OnPlayerDisconnect(playerid, reason)
  45. {
  46.     return 1;
  47. }
  48.  
  49. public OnPlayerSpawn(playerid)
  50. {
  51.     return 1;
  52. }
  53.  
  54. public OnPlayerDeath(playerid, killerid, reason)
  55. {
  56.     return 1;
  57. }
  58.  
  59. public OnVehicleSpawn(vehicleid)
  60. {
  61.     return 1;
  62. }
  63.  
  64. public OnVehicleDeath(vehicleid, killerid)
  65. {
  66.     return 1;
  67. }
  68.  
  69. public OnPlayerText(playerid, text[])
  70. {
  71.     return 1;
  72. }
  73.  
  74. public OnPlayerCommandText(playerid, cmdtext[])
  75. {
  76.     if (strcmp("/whatsmyname", cmdtext, true) == 0)
  77.     {
  78.         new string[126], playername[MAX_PLAYER_NAME];
  79.         GetPlayerName(playerid, playername, sizeof(playername));
  80.         format(string, sizeof(string), "~w~Your username is: ~y~%s~w~.", playername);
  81.         ShowDescriptionText(playerid, string);
  82.         return 1;
  83.     }
  84.     else if(strcmp("/lol", cmdtext, true) == 0)
  85.     {
  86.         ShowDescriptionText(playerid, "~p~Laugh Out Loud");
  87.         return 1;
  88.     }
  89.     return 0;
  90. }
  91.  
  92. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  93. {
  94.     return 1;
  95. }
  96.  
  97. public OnPlayerExitVehicle(playerid, vehicleid)
  98. {
  99.     return 1;
  100. }
  101.  
  102. public OnPlayerStateChange(playerid, newstate, oldstate)
  103. {
  104.     return 1;
  105. }
  106.  
  107. public OnPlayerEnterCheckpoint(playerid)
  108. {
  109.     return 1;
  110. }
  111.  
  112. public OnPlayerLeaveCheckpoint(playerid)
  113. {
  114.     return 1;
  115. }
  116.  
  117. public OnPlayerEnterRaceCheckpoint(playerid)
  118. {
  119.     return 1;
  120. }
  121.  
  122. public OnPlayerLeaveRaceCheckpoint(playerid)
  123. {
  124.     return 1;
  125. }
  126.  
  127. public OnRconCommand(cmd[])
  128. {
  129.     return 1;
  130. }
  131.  
  132. public OnPlayerRequestSpawn(playerid)
  133. {
  134.     return 1;
  135. }
  136.  
  137. public OnObjectMoved(objectid)
  138. {
  139.     return 1;
  140. }
  141.  
  142. public OnPlayerObjectMoved(playerid, objectid)
  143. {
  144.     return 1;
  145. }
  146.  
  147. public OnPlayerPickUpPickup(playerid, pickupid)
  148. {
  149.     return 1;
  150. }
  151.  
  152. public OnVehicleMod(playerid, vehicleid, componentid)
  153. {
  154.     return 1;
  155. }
  156.  
  157. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  158. {
  159.     return 1;
  160. }
  161.  
  162. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  163. {
  164.     return 1;
  165. }
  166.  
  167. public OnPlayerSelectedMenuRow(playerid, row)
  168. {
  169.     return 1;
  170. }
  171.  
  172. public OnPlayerExitedMenu(playerid)
  173. {
  174.     return 1;
  175. }
  176.  
  177. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  178. {
  179.     return 1;
  180. }
  181.  
  182. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  183. {
  184.     return 1;
  185. }
  186.  
  187. public OnRconLoginAttempt(ip[], password[], success)
  188. {
  189.     return 1;
  190. }
  191.  
  192. public OnPlayerUpdate(playerid)
  193. {
  194.     return 1;
  195. }
  196.  
  197. public OnPlayerStreamIn(playerid, forplayerid)
  198. {
  199.     return 1;
  200. }
  201.  
  202. public OnPlayerStreamOut(playerid, forplayerid)
  203. {
  204.     return 1;
  205. }
  206.  
  207. public OnVehicleStreamIn(vehicleid, forplayerid)
  208. {
  209.     return 1;
  210. }
  211.  
  212. public OnVehicleStreamOut(vehicleid, forplayerid)
  213. {
  214.     return 1;
  215. }
  216.  
  217. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  218. {
  219.     return 1;
  220. }
  221.  
  222. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  223. {
  224.     return 1;
  225. }
Advertisement
Add Comment
Please, Sign In to add comment