Advertisement
leo1553

Untitled

Nov 1st, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. [Command("spawn", Alias = "s", Shortcut = "v")]
  2. [CommandGroup("vehicle")]
  3. public static void VehicleCommand(GtaPlayer player, VehicleModelType model)
  4. {
  5. player.SendClientMessage(Color.GreenYellow, "You have spawned a {0}", model);
  6. Console.WriteLine("Spawning a {0} {2} for {1}", model, player, (int) model);
  7. GtaVehicle vehicle = GtaVehicle.Create(model, player.Position + new Vector3(0, 0, 0.5f), player.Rotation.Z, -1,
  8. -1);
  9. player.PutInVehicle(vehicle);
  10. }
  11.  
  12. [Command("vehicle")]
  13. public static void VehicleOverloadCommand(GtaPlayer player)
  14. {
  15. player.SendClientMessage(
  16. "This is the 'vehicle' overload. 'v', 'vehicle spawn' and 'vehicle list' is also available.");
  17. }
  18.  
  19. [Command("tell")]
  20. [Text("message")]
  21. public static void TellCommand(GtaPlayer player, GtaPlayer to, string message)
  22. {
  23. to.SendClientMessage(Color.Green, "{0} tells you: {1}", player.Name, message);
  24. }
  25.  
  26. [Command("put")]
  27. public static void PutCommand(GtaPlayer player, int vehicleid, int seat = 0)
  28. {
  29. GtaVehicle v = GtaVehicle.Find(vehicleid);
  30. if (v == null)
  31. {
  32. player.SendClientMessage(Color.Red, "This vehicle does not exist!");
  33. return;
  34. }
  35. player.PutInVehicle(v, seat);
  36. }
  37.  
  38. [Command("position")]
  39. public static void PositionCommand(GtaPlayer player)
  40. {
  41. player.SendClientMessage(Color.Green, "Position: {0}", player.Position);
  42. }
  43.  
  44. [Command("teleport", Alias = "tp")]
  45. public static void TpCommand(GtaPlayer player, int x, int y, int z = 4)
  46. {
  47. player.Position = new Vector3(x, y, z);
  48. Console.WriteLine("Teleporting {0} to {1}, {2}, {3}", player, x, y, z);
  49. }
  50.  
  51. [Command("wor")]
  52. public static void World(GtaPlayer player, int world)
  53. {
  54. player.VirtualWorld = world;
  55. }
  56.  
  57. [Command("int")]
  58. public static void Interior(GtaPlayer player, int interior)
  59. {
  60. player.Interior = interior;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement