Advertisement
Guest User

Zayan`s_HighJump

a guest
Feb 13th, 2013
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.46 KB | None | 0 0
  1. /*
  2. ===================================================
  3. =================High Jump fS======================
  4. ===================================================
  5. |                                                 |
  6. Created By: Zayan
  7.  
  8. Created On: 12/02/2013 [16:41:58]
  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.  
  20. new IsMad[MAX_PLAYERS];
  21.  
  22. new Float:ghp;
  23.  
  24. public OnFilterScriptInit()
  25. {
  26.     print("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  27.     print(" High Jump Filter Script by Zayan \nIf you find any bug, please report on www.sa-mp.com");
  28.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
  29.     return 1;
  30. }
  31.  
  32. public OnFilterScriptExit()
  33. {
  34.     return 1;
  35. }
  36. public OnPlayerConnect(playerid)
  37. {
  38.      ShowInfo(playerid);
  39.      return 1;
  40. }
  41. public OnPlayerCommandText(playerid, cmdtext[])
  42. {
  43.     if(strcmp("/setjumppower", cmdtext, true, 10) == 0)
  44.     {
  45.         if(IsMad[playerid] == 0)
  46.         {
  47.            if(!IsPlayerAdmin(playerid)) return ReturnErrMsg(playerid);
  48.            SendClientMessage(playerid, 0xFFBBCC, "* Jump power: ON");
  49.            IsMad[playerid] = 1;
  50.            return 1;
  51.         }
  52.         else if(IsMad[playerid] == 1)
  53.         {
  54.            if(!IsPlayerAdmin(playerid)) return ReturnErrMsg(playerid);
  55.            SendClientMessage(playerid, 0xFFBBDD, "* Jump power: 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.             SendClientMessage(playerid, 0xFFBBCC, "NOTE: Press the JUMP_KEY before you hit the ground! (This spam will be removed & the bug will be fixed in the next update)");
  77.         }
  78.     }
  79.     return 1;
  80. }
  81. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  82. {
  83.     if(playerid != INVALID_PLAYER_ID)
  84.     {
  85.         if(IsMad[playerid] == 1)
  86.         {
  87.             SetPlayerHealth(playerid, 100);
  88.         }
  89.     }
  90.     return 1;
  91. }
  92. stock ShowInfo(playerid) // dont remove it ;C
  93. {
  94.      GameTextForPlayer(playerid, "This server is running~n~High jump fs by zayan", 7000, 4);
  95. }
  96. stock ReturnErrMsg(playerid) // new
  97. {
  98.     return SendClientMessage(playerid, 0xFFBBAA, "You are not a RCON admin!");
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement