Guest User

Untitled

a guest
May 18th, 2008
5,290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. /*------------------------------[ Infinitife Nitro ]-----------------------------------
  4.  
  5. This filterscript is made by bert aka boemeles
  6. Vehicle with nos check made by [Fackin']Luke.
  7.  
  8. How does it work: simply press and hold the left mousebutton (or any other key you
  9. defined for start nos and keep the fun going :D
  10.  
  11. ---------------------------------------------------------------------------------------*/
  12.  
  13. public OnFilterScriptInit()
  14. {
  15. print("\n-----------------------------------");
  16. print("Infinite nitro by Bert aka boemeles"); //me!
  17. print("-----------------------------------\n");
  18. SetTimer("NitroReset", 3000, 1);
  19. return 1;
  20. }
  21.  
  22. forward NitroReset();
  23. public NitroReset()
  24. {
  25. for(new i = 0; i<MAX_PLAYERS; i++)
  26. {
  27. if(!IsPlayerInInvalidNosVehicle(i,GetPlayerVehicleID(i))) //ty @ [fackin'] luke //notice the "!"
  28. {
  29. new vehicle = GetPlayerVehicleID(i);
  30. AddVehicleComponent(vehicle, 1010);
  31. }
  32. }
  33. }
  34. //-------------------------[ IsPlayerInValidNosVehicle ]-------------------------------
  35. IsPlayerInInvalidNosVehicle(playerid,vehicleid)
  36. {
  37. #define MAX_INVALID_NOS_VEHICLES 29
  38.  
  39. new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] =
  40. {
  41. 581,523,462,521,463,522,461,448,468,586,
  42. 509,481,510,472,473,493,595,484,430,453,
  43. 452,446,454,590,569,537,538,570,449
  44. };
  45.  
  46. vehicleid = GetPlayerVehicleID(playerid);
  47.  
  48. if(IsPlayerInVehicle(playerid,vehicleid))
  49. {
  50. for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++)
  51. {
  52. if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i])
  53. {
  54. return true;
  55. }
  56. }
  57. }
  58. return false;
  59. }
  60. // end of it!
Advertisement
Add Comment
Please, Sign In to add comment