Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GTA;
- using GTA.Math;
- using GTA.Native;
- using System;
- using System.Collections.Generic;
- namespace TheMenyooMapTemplate
- {
- public class Main : Script
- {
- public Main()
- {
- Tick += Ontick;
- Aborted += OnShutDown;
- }
- public ObjectPlacementMap_Example.MissionOjects Map = new ObjectPlacementMap_Example.MissionOjects(new List<ObjectPlacementMap_Example.ObjectPlacementMap>()
- {
- //place the output from your xml conversion, same name as Menyoo Map here
- });
- public bool Map_Created;
- public void Ontick(object sender, EventArgs e)
- {
- if (!Map_Created)
- {
- for (int i = 0; i < Map.Entities.Count; i++)
- {
- if (Game.Player.Character.Position.DistanceTo(Map.Entities[i].Position)< 100)
- {
- Map_Created = true;
- Map.CreateEntites();
- }
- }
- if (Game.Player.Character.Position.DistanceTo(Map.Entities[0].Position) < 100)
- {
- Map_Created = true;
- Map.CreateEntites();
- }
- if (Game.Player.Character.Position.DistanceTo(new Vector3(500,500,500)) < 100) //Your x,y,z coords
- {
- Map_Created = true;
- Map.CreateEntites();
- }
- }
- }
- public void OnShutDown(object sender, EventArgs e)
- {
- Map.DeleteEntites();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement