Advertisement
Guest User

Klutty

a guest
Apr 11th, 2009
2,318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include <a_samp>
  2. // Auto Repair FS
  3. // by Klutty
  4. forward AutoR();
  5.  
  6. #define FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print("\n--------------------------------------");
  11. print(" ~Auto Repair~ by Klutty");
  12. print("--------------------------------------\n");
  13.  
  14. SetTimer("AutoR", 1000, 1);
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. return 1;
  21. }
  22.  
  23. public AutoR() {
  24. for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
  25. if(IsPlayerConnected(playerid)) {
  26. new Float:health, cid;
  27. if (IsPlayerInAnyVehicle(playerid)) {
  28. cid = GetPlayerVehicleID(playerid);
  29. GetVehicleHealth(cid, health);
  30. if (health < 300) {
  31. SetVehicleHealth(cid,1000);
  32. GameTextForPlayer(playerid, "Vehicle repaired!",2000,5);
  33. }
  34. }
  35. }
  36. }
  37. return 1;
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement