Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. #include <a_samp>
  4. #include <sscanf>
  5.  
  6. #define FILTERSCRIPT
  7. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. print("\n--------------------------------------");
  12. print(" Blank Filterscript by your name here");
  13. print("--------------------------------------\n");
  14. return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19. return 1;
  20. }
  21. forward SaveToLog(filename[],text[]);
  22. public OnGameModeInit()
  23. {
  24. return 1;
  25. }
  26.  
  27. public OnGameModeExit()
  28. {
  29. return 1;
  30. }
  31.  
  32. public OnPlayerRequestClass(playerid, classid)
  33. {
  34. return 1;
  35. }
  36.  
  37. public OnPlayerConnect(playerid)
  38. {
  39. return 1;
  40. }
  41.  
  42. public OnPlayerDisconnect(playerid, reason)
  43. {
  44. return 1;
  45. }
  46.  
  47. public OnPlayerSpawn(playerid)
  48. {
  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. dcmd(addlabel,8,cmdtext);
  75. return 0;
  76. }
  77. dcmd_addlabel(playerid,params[])
  78. {
  79. new label,Float: X, Float: Y, Float: Z,text[100],distance;
  80. GetPlayerPos(playerid, X,Y,Z);
  81. if(sscanf(params,"sd",text)) return SendClientMessage(playerid,0xFB9204FF,"USAGE: /addlabel [text][distance]");
  82. label = Create3DTextLabel(text,0x03B8FCFF,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
  83. SaveToLog("labels",label);
  84. return 1;
  85. }
  86. public SaveToLog(filename[],text[])
  87. {
  88. new File:ffile;
  89. new filepath[128];
  90. new string[128];
  91.  
  92. format(filepath,sizeof(filepath),"%s.txt",filename);
  93. ffile = fopen(filepath,io_append);
  94. format(string,sizeof(string)," %s\r\n",text);
  95. fwrite(ffile,string);
  96. fclose(ffile);
  97. return 1;
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement