contactmail

Faggios with hydraulics

Jul 27th, 2013
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. // Faggios with hydraulics by Sellize
  2. #define FILTERSCRIPT
  3.  
  4. #define PRESSED(%0) \
  5. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  6.  
  7. #include <a_samp>
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. print("Faggios with hydraulics by Sellize");
  12. return 1;
  13. }
  14.  
  15. public OnFilterScriptExit()
  16. {
  17. return 1;
  18. }
  19.  
  20. public OnPlayerConnect(playerid)
  21. {
  22. SetPVarInt(playerid, "faggio", 0);
  23. return 1;
  24. }
  25.  
  26. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  27. {
  28. if (PRESSED(KEY_CROUCH))
  29. {
  30. if(IsPlayerInAnyVehicle(playerid))
  31. {
  32. new faggio = GetPlayerVehicleID(playerid);
  33. if(GetVehicleModel(faggio) == 462)
  34. {
  35. if(GetPVarInt(playerid, "faggio") == 0)
  36. {
  37. new Float:x, Float:y, Float:z;
  38. GetVehiclePos(faggio, x, y, z);
  39. SetVehiclePos(faggio, x, y, z + 1);
  40. PutPlayerInVehicle(playerid, faggio, 0);
  41. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  42. SetPVarInt(playerid, "faggio", 1);
  43. SetTimer("faggiotimer", 1000, 0);
  44. }
  45. }
  46. }
  47. }
  48. return 1;
  49. }
  50.  
  51. forward faggiotimer(playerid);
  52. public faggiotimer(playerid)
  53. {
  54. SetPVarInt(playerid, "faggio", 0);
  55. }
Advertisement
Add Comment
Please, Sign In to add comment