SAMProductions

[MJSys-v1.0] - Mega Jump System v1.0 by SAMProductions

Sep 27th, 2013
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.92 KB | None | 0 0
  1.                                                                                                                                                                     /*
  2.  
  3.      ______________________________________________________________________
  4.     |                  _       _                  ________                 |
  5.     |                (  \    (  \               (   _____ \                |
  6.     |                |  |    |  |      ______   |  |     \ \               |
  7.     |                |  |____|  |    (    ___\  |  |      \ \              |
  8.     |                |   ____   |     \  \  (_) |  |       ) )             |
  9.     |                |  |    |  |   _  \  \     |  |      / /              |
  10.     |                |  )    |  ) (  )__\  \    |  |_____/ /               |
  11.     |                |_/     |_/   \_______/    |_________/                |
  12.     |                                                                      |
  13.     |                       [HSD] High Speed Drivers                       |
  14.     |                                                                      |
  15.     |      [HSD] Company Clan of Programmers, Scripters, and Mappers       |
  16.     |______________________________________________________________________|
  17.                      http://forum.sa-mp.com/member.php?u=211939
  18.  
  19.                         Updated Date: 09/27/2013 (MM/DD/YYYY)
  20.  
  21.                        Visit Me on SA-MP Forum for More Updates
  22.  
  23.                                  Let the Credits !
  24.  
  25. • Super Fast System
  26. • [1] Command(s)
  27. • Fast Commands to Enable or Disable System
  28. • http://forum.sa-mp.com/member.php?u=211939 | Visit Me on SA-MP Forum |.
  29.  
  30. ~ Do: ~
  31.  
  32. - Must have Permission if you want to Share this on another Website.
  33. - etc.
  34.  
  35. ~ Do Not: ~
  36.  
  37. - Remove Credits.
  38. - Change Author Name / Information.
  39. - Stealing Filterscript.
  40. - No Permission but Sharing on another Website.
  41. - etc.
  42.  
  43. [ Information ] :-
  44.  
  45. Author: SAMProductions
  46. FilterScript Name: Simple MegaJump System v1
  47. Updated Date: 09/27/2013 - (MM/DD/YYYY)
  48.  
  49. Thanks To:
  50.  
  51. Others - a_samp
  52. ZeeX - zcmd
  53. Y_Less - sscanf2
  54.  
  55. and to Whoever i forgot to Mention
  56.  
  57. -: [ End Information ]
  58.  
  59. • Do not Remove the Credits.
  60. • Do not Change the Author Name / Information.
  61. • Do not Steal the Filterscript.
  62.  
  63. • Disrespecting Any of These, You will Die.
  64. • Disrespecting Any of These, I'll Rape You.
  65. • Disrespecting Any of These, I'll Report You.
  66.  
  67. • Thanks For Using, Enjoy :)
  68.  
  69.  
  70.  
  71. //----------------------------------------------------------------------------//                                                                                                                                                                                                                                    */
  72.  
  73. #define FILTERSCRIPT
  74.  
  75. #include <a_samp>
  76. #include <zcmd>
  77. #include <sscanf2>
  78.  
  79. #if defined FILTERSCRIPT
  80.  
  81. public OnFilterScriptInit()
  82. {
  83.         print("<|-----------------------[Loaded]-----------------------|>");
  84.         print(" | Mega Jump System (/megajump) Made By: SAMProductions |");
  85.         print("<|-----------------------[Loaded]-----------------------|>");
  86.         return 1;
  87. }
  88.  
  89. public OnFilterScriptExit()
  90. {
  91.         print("<|----------------------[UnLoaded]----------------------|>");
  92.         print(" | Mega Jump System (/megajump) Made By: SAMProductions |");
  93.         print("<|----------------------[UnLoaded]----------------------|>");
  94.         return 1;
  95. }
  96.  
  97. #else
  98.  
  99. main()
  100. {
  101.         print("\n----------------------------------");
  102.         print(" Blank Gamemode by your name here");
  103.         print("----------------------------------\n");
  104. }
  105.  
  106. #endif
  107.  
  108. new MegaJump[MAX_PLAYERS];
  109.  
  110. #define PRESSED(%0) \
  111. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  112.  
  113. public OnPlayerConnect(playerid)
  114. {
  115.     MegaJump[playerid] = 0;
  116.     return 1;
  117. }
  118.  
  119. public OnPlayerDisconnect(playerid, reason)
  120. {
  121.     MegaJump[playerid] = 0;
  122.     return 1;
  123. }
  124.  
  125. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  126. {
  127.     if(MegaJump[playerid] == 1)
  128.     {
  129.         if(PRESSED(KEY_JUMP))
  130.         {
  131.             new Float:P[3];
  132.             GetPlayerPos(playerid,P[0],P[1],P[2]);
  133.             GetPlayerVelocity(playerid,P[0],P[1],P[2]);
  134.             SetPlayerVelocity(playerid,P[0],P[1],P[2]+5.0);
  135.         }
  136.     }
  137.     return 1;
  138. }
  139.  
  140. CMD:megajump(playerid, params[])
  141. {
  142.     if(MegaJump[playerid] == 0)
  143.     {
  144.         SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}You have Enabled Mega Jump !");
  145.         SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}Use {FF0000}/megajump {EEEEEE}again, If you wish to {FF0000}Disable {EEEEEE}it.");
  146.         PlayerPlaySound(playerid, 1137, 0.0,0.0,0.0);
  147.         MegaJump[playerid] = 1;
  148.     }
  149.     else if(MegaJump[playerid] == 1)
  150.     {
  151.         SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}You have Disabled Mega Jump !");
  152.         SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}Use {FF0000}/megajump {EEEEEE}again, If you wish to {FF0000}Enable {EEEEEE}it.");
  153.         PlayerPlaySound(playerid, 1137, 0.0,0.0,0.0);
  154.         MegaJump[playerid] = 0;
  155.     }
  156.     return 1;
  157. }
Advertisement
Add Comment
Please, Sign In to add comment