public void DialogEnd() { Function.Call(Hash.DISPLAY_HUD, 1); Function.Call(Hash.DISPLAY_RADAR, 1); World.RenderingCamera = null; Game.Player.CanControlCharacter = true; View.RemoveMenu(DialogMenu); CurrentNpc = null; CurrentDialog = null; }
//Dialog public void StartDialog(NpcObject npcObject) { CurrentNpc = npcObject; CurrentDialog = npcObject.Dialog; CurrentDialog.Current = CurrentDialog.StartingDialog; Function.Call(Hash.DISPLAY_HUD, 0); Function.Call(Hash.DISPLAY_RADAR, 0); Game.Player.CanControlCharacter = false; NpcCamera.Position = CurrentNpc.Position + CurrentNpc.Ped.RightVector * 4f; var mid = (CurrentNpc.Position + Game.Player.Character.Position) / 2; NpcCamera.PointAt(mid); }
public NpcObject(string name, PedHash modelName, Vector3 pos, float heading) : base(0) { BlipSprite = BlipSprite.SMG; Name = name; ModelName = modelName; Position = pos; Heading = heading; IsQuestNpc = true; Dialog = new DialogContainer(this); SimpleDialog = new List <string>(); Ped = null; QuestsToGive = new List <string>(); PersonalQuestLine = new List <string>(); QuestHandIns = new List <string>(); SideQuests = new List <string>(); QuestConditionChecks = new List <QuestConditionCheck>(); }
//Dialog public void StartDialog(NpcObject npcObject) { CurrentNpc = npcObject; CurrentDialog = npcObject.Dialog; CurrentDialog.Current = CurrentDialog.StartingDialog; Function.Call(Hash.DISPLAY_HUD, 0); Function.Call(Hash.DISPLAY_RADAR, 0); Game.Player.CanControlCharacter = false; NpcCamera.Position = CurrentNpc.Position + CurrentNpc.Ped.RightVector * 4f; var mid = (CurrentNpc.Position + Game.Player.Character.Position)/2; NpcCamera.PointAt(mid); }
public NpcObject(string name, PedHash modelName, Vector3 pos, float heading) : base(0) { BlipSprite = BlipSprite.SMG; Name = name; ModelName = modelName; Position = pos; Heading = heading; IsQuestNpc = true; Dialog = new DialogContainer(this); SimpleDialog = new List<string>(); Ped = null; }
public NpcObject(string name, PedHash modelName, Vector3 pos, float heading) : base(0) { BlipSprite = BlipSprite.SMG; Name = name; ModelName = modelName; Position = pos; Heading = heading; IsQuestNpc = true; Dialog = new DialogContainer(this); SimpleDialog = new List<string>(); Ped = null; QuestsToGive = new List<string>(); PersonalQuestLine = new List<string>(); QuestHandIns = new List<string>(); SideQuests = new List<string>(); QuestConditionChecks = new List<QuestConditionCheck>(); }