Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. using GrandTheftMultiplayer.Server.API;
  2. using GrandTheftMultiplayer.Shared.Math;
  3.  
  4. namespace dillauge
  5. {
  6. class sBusdriver : Script
  7. {
  8. public sBusdriver()
  9. {
  10. API.onResourceStart += startBusdriver;
  11. }
  12.  
  13. public void startBusdriver()
  14. {
  15. new BusStop("Busbahnhof LS", new Vector3(438.875, -685.101, 27.884), new Vector3(0.0, 0.0, 0.0), false);
  16. }
  17. }
  18.  
  19. // Klasse - Bushaltestelle
  20. class BusStop : Script
  21. {
  22. public string location { get; set; }
  23. public Vector3 pos { get; set; }
  24. public Vector3 rot { get; set; }
  25. public bool alreadyExist { get; set; }
  26.  
  27. // Konstruktor
  28. public BusStop() { }
  29. public BusStop(string location, Vector3 pos, Vector3 rot, bool alreadyExist)
  30. {
  31. this.location = location;
  32. this.pos = pos;
  33. this.rot = rot;
  34. this.alreadyExist = alreadyExist;
  35.  
  36. if(!alreadyExist)
  37. API.createObject(2142033519, pos, rot);
  38.  
  39. API.createTextLabel(rot.X + ", " + rot.Y + ", " + rot.Z, new Vector3(pos.X + 2.2, pos.Y + 0.25, pos.Z + 1.3), 50.0f, 0.5f, true);
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement