Advertisement
DoctorX13

XVehicleDestroyedInfo

Oct 27th, 2019 (edited)
634
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. //Script Created By Senior S
  2. //You are able to edit it as you pleasure
  3.  
  4. //Translations:
  5. destroyed = "are destroyed";
  6. players_nearby = "Players nearby:";
  7. location_nearby = "Location nearby:";
  8.  
  9. //Arrays: Only edit the first!!!
  10. webhook_url = "INSERT_YOUR_WEBHOOK_URL";
  11. avatar = "https://www.iconninja.com/files/896/676/925/car-vehicles-drive-automobile-icon.png";
  12. players = array();
  13. name = 0;
  14. pos = 0;
  15. vdestroyed = 0;
  16.  
  17. event onInterval(1){
  18. foreach(vehicle in vehicleManager.vehicles){
  19. if(vehicle.health == 0){
  20. name = vehicle.name;
  21. pos = vehicle.position;
  22. vdestroyed = 1;
  23. vehicle.destroy();
  24. discord.send("`" + name + "` " + destroyed, webhook_url, "VehicleDestroyedInfo", avatar);
  25. }
  26. }
  27. foreach(loopPlayer in server.players){
  28. if(vdestroyed == 1 and v3.distance(pos, loopPlayer.position) < 8){
  29. players.add(loopPlayer.name);
  30. pnearby = loopPlayer.getNearestLocation();
  31. discord.send("`" + players_nearby + "` -" + players[0] + " -" + players[1] + " -" + players[2] + " -" + players[3] + " -" + players [4], webhook_url, "VehicleDestroyedInfo", avatar);
  32. discord.send("`" + location_nearby + "` " + pnearby, webhook_url, "VehicleDestroyedInfo", avatar);
  33. vdestroyed = 0;
  34. players.remove(loopPlayer.name);
  35. }
  36. }
  37. }
  38.  
  39. event onPlayerQuit(player){
  40. players.remove(player.name);
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement