Advertisement
Guest User

handbrake

a guest
Jul 30th, 2012
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. // Super brake script by Audi_Quattrix
  2. #define FILTERSCRIPT
  3. #include <a_samp>
  4. #include <zcmd>
  5. #if defined FILTERSCRIPT
  6. #define PRESSED(%0) \
  7. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  8. new Handbrake[MAX_PLAYERS];
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" Super brake script by Audi_Quattrix loaded");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. print("\n--------------------------------------");
  21. print(" Super brake script by Audi_Quattrix unloaded");
  22. print("--------------------------------------\n");
  23. return 1;
  24. }
  25. public OnPlayerConnect(playerid)
  26. {
  27. Handbrake[playerid] = 0;
  28. return 1;
  29. }
  30. CMD:handbrake(playerid)
  31. {
  32. if(Handbrake[playerid]== 0)
  33. {
  34. Handbrake[playerid]= 1;
  35. SendClientMessage(playerid,0x00FFFFAA,"Handbrake ON!");
  36. }
  37. else if(Handbrake[playerid] == 1)
  38. {
  39. Handbrake[playerid] = 0;
  40. SendClientMessage(playerid,0x00FFFFAA,"Handbrake OFF!");
  41. }
  42. return 1;
  43. }
  44. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  45. {
  46. if (GetPlayerVehicleSeat(playerid) == 0 ||PRESSED(KEY_HANDBRAKE))
  47. {
  48. if (Handbrake[playerid] == 0)
  49. {
  50.  
  51. }
  52. else if (Handbrake[playerid] == 1)
  53. {
  54. SetVehicleVelocity(GetPlayerVehicleID(playerid),0,0,0);
  55. }
  56. }
  57. return 1;
  58. }
  59. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement