Advertisement
1Geek

1Geek Car Boooooooster

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