Advertisement
Guest User

High Jump [fS] | Made By: Zayan

a guest
Feb 12th, 2013
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.09 KB | None | 0 0
  1. /*
  2. ===================================================
  3. =================High Jump fS======================
  4. ===================================================
  5. |                                                 |
  6. Created By: Zayan
  7.  
  8. Created On: 12/02/2013 [17:20:39]
  9.  
  10. Created By Using: Pawn compiler 3.2.3664 (PAWNO)
  11.  
  12. Thanks To: SA-MP for functions & more
  13.  
  14. If you find any bug, please report it on  with a photo.
  15.  
  16. */
  17. #include <a_samp>
  18.  
  19. #define PRESSED(%0) \
  20.     (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  21.  
  22. new IsMad[MAX_PLAYERS];
  23.  
  24. new Float:ghp;
  25.  
  26. public OnFilterScriptInit()
  27. {
  28.     print("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  29.     print(" High Jump Filter Script by Zayan \nIf you find any bug, please report on www.sa-mp.com");
  30.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
  31.     return 1;
  32. }
  33.  
  34. public OnFilterScriptExit()
  35. {
  36.     return 1;
  37. }
  38. public OnPlayerConnect(playerid)
  39. {
  40.      ShowInfo(playerid);
  41.      return 1;
  42. }
  43. public OnPlayerCommandText(playerid, cmdtext[])
  44. {
  45.     if(strcmp("/setjumppower", cmdtext, true, 10) == 0)
  46.     {
  47.         if(IsMad[playerid] == 0)
  48.         {
  49.            SendClientMessage(playerid, 0xFFBBCC, "* Jump: ON");
  50.            IsMad[playerid] = 1;
  51.            return 1;
  52.         }
  53.         else if(IsMad[playerid] == 1)
  54.         {
  55.            SendClientMessage(playerid, 0xFFBBCC, "* Jump: OFF");
  56.            IsMad[playerid] = 0;
  57.            return 1;
  58.         }
  59.         return 1;
  60.     }
  61.     return 0;
  62. }
  63. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  64. {
  65.     if(newkeys & KEY_JUMP)
  66.     {
  67.         if(IsMad[playerid] == 1)
  68.         {
  69.             new Float:X;
  70.             new Float:Y;
  71.             new Float:Z;
  72.             GetPlayerPos(playerid, X,Y,Z);
  73.             GetPlayerHealth(playerid, ghp);
  74.             CreateExplosion(X,Y,Z-2,7,6);
  75.             SetPlayerHealth(playerid, ghp);
  76.         }
  77.     }
  78.     return 1;
  79. }
  80. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  81. {
  82.     if(playerid != INVALID_PLAYER_ID)
  83.     {
  84.         if(IsMad[playerid] == 1)
  85.         {
  86.             SetPlayerHealth(playerid, 100);
  87.         }
  88.     }
  89.     return 1;
  90. }
  91. stock ShowInfo(playerid)
  92. {
  93.      GameTextForPlayer(playerid, "This server is running~n~High jump fs by zayan", 7000, 4);
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement