Advertisement
AlicanDurmaz

eJump | Süper Zıplama Sistemi

Mar 4th, 2017
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. /*
  2. Excision Jump Sistemi
  3. */
  4. #include <a_samp>
  5. #include <zcmd>
  6. new bool:eJump[MAX_PLAYERS];
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print("\n--------------------------------------");
  11. print(" Excision Jump Sistemi ");
  12. print("--------------------------------------\n");
  13. return 1;
  14. }
  15. public OnPlayerConnect(playerid)
  16. {
  17. eJump[playerid] = false;
  18. return 1;
  19. }
  20. CMD:superman(playerid, params[])
  21. {
  22. if(eJump[playerid] == false)
  23. {
  24. eJump[playerid] = true;
  25. SendClientMessage(playerid,-1, "Süper zıplama acıldı .");
  26. }else
  27. {
  28. eJump[playerid] = false;
  29. SendClientMessage(playerid,-1, "Süper zıplama kapatıldı.");
  30. }
  31. return 1;
  32. }
  33. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  34. {
  35. if(newkeys & KEY_JUMP)
  36. {
  37. if(!spamProtect(playerid, "eJump", 5))return 1;
  38. if(eJump[playerid] == true)
  39. {
  40. new Float: ePos[3];
  41. GetPlayerVelocity(playerid, ePos[0], ePos[1], ePos[2]);
  42. SetPlayerVelocity(playerid, ePos[0], ePos[1], ePos[2]+5);
  43. }
  44. }
  45. return 1;
  46. }
  47. //RyDeR`
  48. stock spamProtect(playerid, const szSpam[], iTime) {
  49. static
  50. s_szPVar[32],
  51. s_iPVar
  52. ;
  53. format(s_szPVar, sizeof(s_szPVar), "pv_iSpam_%s", szSpam);
  54. s_iPVar = GetPVarInt(playerid, s_szPVar);
  55. if((GetTickCount() - s_iPVar) < iTime * 1000) {
  56. return 0;
  57. } else {
  58. SetPVarInt(playerid, s_szPVar, GetTickCount());
  59. }
  60. return true;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement