Advertisement
Guest User

LU AutoFix

a guest
May 11th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onPlayerCommand(player,command,params)
  2. {
  3. if(command.tolower() == "autofix")
  4. {
  5. if(!AutoFix[player.ID])
  6. {
  7. AutoFix[player.ID] <- true;
  8. MessagePlayer( "[#FFFF00]*PM* [#FFFFFF]Automatic fix [#00FF00]ON.", player );
  9. }
  10. else
  11. {
  12. AutoFix[player.ID] <- false;
  13. MessagePlayer( "[#FFFF00]*PM* [#FFFFFF]Automatic fix [#FF0000]OFF.", player );
  14. }
  15. }
  16. }
  17.  
  18. function onPlayerConnect(player)
  19. {
  20. AutoFix[player.ID] <- true;
  21. }
  22.  
  23. function onPlayerPart(player,reason)
  24. {
  25. AutoFix[player.ID] <- null;
  26. }
  27.  
  28. function onScriptLoad()
  29. {
  30. AutoFix <- {};
  31. }
  32.  
  33. function onVehicleHealthChange(vehicle,oldhealth,newhealth)
  34. {
  35. if(vehicle.Driver)
  36. {
  37. if(AutoFix[vehicle.Driver.ID])
  38. {
  39. vehicle.Fix();
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement