Advertisement
Ygzeb

Timer

Nov 21st, 2014
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.31 KB | None | 0 0
  1. /*
  2.                                       Copyright © Saving
  3.  ______________________________________________________________________________________________
  4. |                                                                                              |                                                                           |
  5. |    * SA-MP timer bug.                                                                        |
  6. |______________________________________________________________________________________________|
  7.  
  8.                                    FilterScript - [FS]Timer
  9.                                   --------------------------
  10. */
  11.  
  12. //==============================================================================
  13. // Include.
  14. //==============================================================================
  15. #include <a_samp>
  16. //==============================================================================
  17. // Variable.
  18. //==============================================================================
  19. new Connect[MAX_PLAYERS];
  20. //==============================================================================
  21. // Anti-Amx.
  22. //==============================================================================
  23. AntiAmx()
  24. {
  25. new a[][] =
  26. {
  27. "Unarmed (Fist)",
  28. "Brass K"
  29. };
  30. #pragma unused a
  31. }
  32. //==============================================================================
  33. // Forward.
  34. //==============================================================================
  35. forward Test(playerid);
  36. //==============================================================================
  37. //------------------------------------------------------------------------------
  38. //                          Publics.
  39. //------------------------------------------------------------------------------
  40. //==============================================================================
  41. //==============================================================================
  42. // Public - OnFilterScriptInit.
  43. //==============================================================================
  44. public OnFilterScriptInit()
  45. {
  46. AntiAmx();
  47. return 1;
  48. }
  49. //==============================================================================
  50. // Public - OnFilterScriptExit.
  51. //==============================================================================
  52. public OnFilterScriptExit()
  53. {
  54. AntiAmx();
  55. return 1;
  56. }
  57. //==============================================================================
  58. // Public - OnPlayerCommandText.
  59. //==============================================================================
  60. //==============================================================================
  61. // Command.
  62. //==============================================================================
  63. public OnPlayerCommandText(playerid, cmdtext[])
  64. {
  65. if(!strcmp(cmdtext, "/Timer", true))
  66. {
  67. Connect[playerid] = SetTimerEx("Test", 1000, true, "i", playerid);
  68. return 1;
  69. }
  70. if(!strcmp(cmdtext, "/Killer", true))
  71. {
  72. KillTimer(Connect[playerid]);
  73. return 1;
  74. }
  75. return 0;
  76. }
  77. //==============================================================================
  78. // Public - Test.
  79. //==============================================================================
  80. public Test(playerid)
  81. {
  82. print("Running timer.");
  83. SendClientMessage(playerid, -1, "Timer running.");
  84. }
  85.  
  86. // © Flare Entertainment - All rights reserved.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement