Advertisement
Guest User

Bla

a guest
Jun 28th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.22 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. new PlayerText:welcomeText;
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" Blank Filterscript by your name here");
  15.     print("--------------------------------------\n");
  16.     return 1;
  17. }
  18.  
  19. public OnFilterScriptExit()
  20. {
  21.     return 1;
  22. }
  23.  
  24. #else
  25.  
  26. main()
  27. {
  28.     print("\n----------------------------------");
  29.     print(" Blank Gamemode by your name here");
  30.     print("----------------------------------\n");
  31. }
  32.  
  33. #endif
  34.  
  35. public OnGameModeInit()
  36. {
  37.     // Don't use these lines if it's a filterscript
  38.     SetGameModeText("Blank Script");
  39.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  40.     return 1;
  41. }
  42.  
  43. public OnGameModeExit()
  44. {
  45.     return 1;
  46. }
  47.  
  48. public OnPlayerRequestClass(playerid, classid)
  49. {
  50.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  51.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  52.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  53.     return 1;
  54. }
  55.  
  56. public OnPlayerConnect(playerid)
  57. {
  58.     return 1;
  59. }
  60.  
  61. public OnPlayerDisconnect(playerid, reason)
  62. {
  63.     return 1;
  64. }
  65.  
  66. public OnPlayerSpawn(playerid)
  67. {
  68.     return 1;
  69. }
  70.  
  71. public OnPlayerDeath(playerid, killerid, reason)
  72. {
  73.     return 1;
  74. }
  75.  
  76. public OnVehicleSpawn(vehicleid)
  77. {
  78.     return 1;
  79. }
  80.  
  81. public OnVehicleDeath(vehicleid, killerid)
  82. {
  83.     return 1;
  84. }
  85.  
  86. public OnPlayerText(playerid, text[])
  87. {
  88.     return 1;
  89. }
  90.  
  91. public OnPlayerCommandText(playerid, cmdtext[])
  92. {
  93.     if (strcmp("/text1", cmdtext, true, 10) == 0)
  94.     {
  95.         PlayerTextDrawSetString(playerid, welcomeText, "text1");
  96.         return 1;
  97.     }
  98.     if (strcmp("/text2", cmdtext, true, 10) == 0)
  99.     {
  100.         PlayerTextDrawSetString(playerid, welcomeText, "text2");
  101.         return 1;
  102.     }
  103.     if (strcmp("/show", cmdtext, true, 10) == 0)
  104.     {
  105.         PlayerTextDrawShow(playerid, welcomeText);
  106.         return 1;
  107.     }
  108.     if (strcmp("/hide", cmdtext, true, 10) == 0)
  109.     {
  110.         PlayerTextDrawHide(playerid, welcomeText);
  111.         return 1;
  112.     }
  113.     if(strcmp("/td",cmdtext,true,10) == 0) {
  114.         welcomeText = CreatePlayerTextDraw(playerid, 320.0, 100.0, "Test Text 1"); // Text is txdfile:texture
  115.         PlayerTextDrawUseBox(playerid,welcomeText, 1);
  116.         PlayerTextDrawBoxColor(playerid,welcomeText, 0x00000044);
  117.         PlayerTextDrawFont(playerid,welcomeText, 3);
  118.         PlayerTextDrawSetShadow(playerid,welcomeText,0); // no shadow
  119.         PlayerTextDrawSetOutline(playerid,welcomeText,2); // thickness 1
  120.         PlayerTextDrawBackgroundColor(playerid, welcomeText,0x000000FF);
  121.         PlayerTextDrawColor(playerid,welcomeText,0xFFFFFFFF);
  122.         PlayerTextDrawAlignment(playerid,welcomeText,2); // centered
  123.         PlayerTextDrawLetterSize(playerid,welcomeText,0.5,1.5);
  124.         PlayerTextDrawTextSize(playerid,welcomeText, 50.0, 200.0); // reverse width and height for rockstar (only for centered td's)
  125.         PlayerTextDrawSetSelectable(playerid,welcomeText,1);
  126.         PlayerTextDrawShow(playerid,welcomeText);
  127.         SelectTextDraw(playerid, 0x9999BBBB);
  128.         SelectTextDraw(playerid, 0x00FF00FF);
  129.         return 1;
  130.     }
  131.     return 0;
  132. }
  133.  
  134. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  135. {
  136.     return 1;
  137. }
  138.  
  139. public OnPlayerExitVehicle(playerid, vehicleid)
  140. {
  141.     return 1;
  142. }
  143.  
  144. public OnPlayerStateChange(playerid, newstate, oldstate)
  145. {
  146.     return 1;
  147. }
  148.  
  149. public OnPlayerEnterCheckpoint(playerid)
  150. {
  151.     return 1;
  152. }
  153.  
  154. public OnPlayerLeaveCheckpoint(playerid)
  155. {
  156.     return 1;
  157. }
  158.  
  159. public OnPlayerEnterRaceCheckpoint(playerid)
  160. {
  161.     return 1;
  162. }
  163.  
  164. public OnPlayerLeaveRaceCheckpoint(playerid)
  165. {
  166.     return 1;
  167. }
  168.  
  169. public OnRconCommand(cmd[])
  170. {
  171.     return 1;
  172. }
  173.  
  174. public OnPlayerRequestSpawn(playerid)
  175. {
  176.     return 1;
  177. }
  178.  
  179. public OnObjectMoved(objectid)
  180. {
  181.     return 1;
  182. }
  183.  
  184. public OnPlayerObjectMoved(playerid, objectid)
  185. {
  186.     return 1;
  187. }
  188.  
  189. public OnPlayerPickUpPickup(playerid, pickupid)
  190. {
  191.     return 1;
  192. }
  193.  
  194. public OnVehicleMod(playerid, vehicleid, componentid)
  195. {
  196.     return 1;
  197. }
  198.  
  199. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  200. {
  201.     return 1;
  202. }
  203.  
  204. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  205. {
  206.     return 1;
  207. }
  208.  
  209. public OnPlayerSelectedMenuRow(playerid, row)
  210. {
  211.     return 1;
  212. }
  213.  
  214. public OnPlayerExitedMenu(playerid)
  215. {
  216.     return 1;
  217. }
  218.  
  219. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  220. {
  221.     return 1;
  222. }
  223.  
  224. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  225. {
  226.     return 1;
  227. }
  228.  
  229. public OnRconLoginAttempt(ip[], password[], success)
  230. {
  231.     return 1;
  232. }
  233.  
  234. public OnPlayerUpdate(playerid)
  235. {
  236.     return 1;
  237. }
  238.  
  239. public OnPlayerStreamIn(playerid, forplayerid)
  240. {
  241.     return 1;
  242. }
  243.  
  244. public OnPlayerStreamOut(playerid, forplayerid)
  245. {
  246.     return 1;
  247. }
  248.  
  249. public OnVehicleStreamIn(vehicleid, forplayerid)
  250. {
  251.     return 1;
  252. }
  253.  
  254. public OnVehicleStreamOut(vehicleid, forplayerid)
  255. {
  256.     return 1;
  257. }
  258.  
  259. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  260. {
  261.     return 1;
  262. }
  263.  
  264. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  265. {
  266.     return 1;
  267. }
  268.  
  269. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  270. {
  271.     if(playertextid == welcomeText)
  272.     {
  273.         new string[128];
  274.         format(string, sizeof(string), "ID %i clicked on ID %i", playerid, _:welcomeText);
  275.         SendClientMessageToAll(-1, string);
  276.     }
  277.     return 1;
  278. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement