Advertisement
Guest User

Speed Boost & Jump Car

a guest
Apr 27th, 2012
9,227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.78 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3.  
  4. new EnableBoast[MAX_PLAYERS];
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10.     print("\n--------------------------------------");
  11.     print("SpeedBoost By Faour");
  12.     print("--------------------------------------\n");
  13.     return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18.     print("\n--------------------------------------");
  19.     print("Un Loaded Boost By Faour");
  20.     print("--------------------------------------\n");
  21.     return 1;
  22. }
  23.  
  24. #else
  25.  
  26. main()
  27. {
  28.  
  29.  
  30. print("////////////////////////////////////////////////////////////////////////\n");
  31. print("________________________________________________________________________\n");
  32. print("/////////\n");
  33. print("//\n");
  34. print("//\n");
  35. print("//\n");
  36. print("////////    /////////        /////////     /       /      /////////\n");
  37. print("//          /       /        /       /     /       /       //\n");
  38. print("//          /       /        /       /     /       /       //\n");
  39. print("//          /       /        /       /     /       /       //\n");
  40. print("//          ///////////      /////////     /////////       //\n");
  41. print("________________________________________________________________________\n");
  42. print("////////////////////////////////////////////////////////////////////////\n");
  43. print("Speed Boost By Faour = Aloushi");
  44.  
  45. }
  46.  
  47. #endif
  48.  
  49.  
  50.  
  51.  
  52. public OnPlayerSpawn(playerid)
  53. {
  54. EnableBoast[playerid] = 0;
  55. return 1;
  56. }
  57.  
  58.  
  59. public OnPlayerCommandText(playerid, cmdtext[])
  60. {
  61.     if(!strcmp(cmdtext, "/Boost", true))
  62.     {
  63.     if(EnableBoast[playerid])
  64.     {
  65.     EnableBoast[playerid] = 0; //will enable boast
  66.     SendClientMessage(playerid, 0x924161FF, "[ ! ] Boost Deactivated.");
  67.  
  68.     }
  69.     else
  70.     {
  71.     EnableBoast[playerid] = 1; //will enable boast
  72.     SendClientMessage(playerid, 0x924161FF, "[ ! ] Boost Activated.");
  73.  
  74.     }
  75.     return 1;
  76.     }
  77.     return 0;
  78. }
  79. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  80. {
  81.  
  82.         if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  83.         {
  84.  
  85.         if(newkeys & KEY_FIRE)
  86.         {
  87.  
  88.  
  89.  
  90.         if(EnableBoast[playerid] == 1)
  91.         {
  92.         new Float:vx,Float:vy,Float:vz;
  93.         GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);
  94.         SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.8, vy *1.8, vz * 1.8);
  95.         }
  96.         }
  97.         }
  98.  
  99.  
  100.         if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  101.         {
  102.         if (newkeys & KEY_CROUCH)
  103.         {
  104.  
  105.         if(EnableBoast[playerid] == 1)
  106.         {
  107.         new Float:x, Float:y, Float:z;
  108.         GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
  109.         SetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z+0.3);
  110.         }
  111.         }
  112.         }
  113.         return 1;
  114.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement