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.Windows.Forms;
- public partial class Lestermission : Script
- {
- enum Missiontask
- {
- none,
- initialize,
- atLester,
- goToVehicle,
- enterVehicle,
- pickupGuard,
- isGuardInVehicle,
- restartMission
- }
- Ped player = Game.Player.Character;
- Ped lester;
- Ped guard;
- Vehicle missionVehicle;
- Blip blipDestination;
- Vector3 guardMarkerPos = new Vector3(373.0939f, -767.4551f, 28.29266f);
- Vector3 lesterStairsPos = new Vector3(717.9989f, -976.9f, 23.31f);
- Vector3 missionVehiclePos = new Vector3(695.8693f, -1005.955f, 22.43776f);
- Vector3 guardPos = new Vector3(370.8857f, -771.8976f, 29.27729f);
- bool missionNotification;
- Missiontask task;
- public Lestermission()
- {
- Tick += (o, e) => Processing();
- KeyUp += (o, e) =>
- {
- if (e.KeyCode == Keys.NumPad7) Initialize();
- if (e.KeyCode == Keys.NumPad1) Deinitialize();
- };
- }
- void Initialize()
- {
- //create mission vehicle and lester
- lester = World.CreatePed(new Model(1302784073), new GTA.Math.Vector3(717.079f, -975.927f, 24.91054f), -153.1001f);
- lester.AddBlip();
- lester.CurrentBlip.Sprite = BlipSprite.Lester;
- lester.CurrentBlip.Color = BlipColor.Red;
- lester.CurrentBlip.Name = "Lester";
- lester.CurrentBlip.IsShortRange = true;
- //setup vars and tasks
- missionNotification = false;
- task = Missiontask.atLester;
- //subtitle
- GTA.UI.ShowSubtitle("Script is now ~g~Initialized");
- }
- void Deinitialize()
- {
- //delete mission items
- if (missionVehicle != null) missionVehicle.Delete();
- if (lester != null) lester.Delete();
- if (guard != null) guard.Delete();
- if (blipDestination != null) blipDestination.Remove();
- Function.Call(Hash.SET_PED_COMPONENT_VARIATION, player, 9, 0, 0, 0); //duffelbag
- Function.Call(Hash.SET_PED_COMPONENT_VARIATION, player, 5, 0, 0, 0); //gloves
- //subtitle
- GTA.UI.ShowSubtitle("Script is now ~r~Deinitialized");
- }
- public void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._SET_TEXT_COMPONENT_FORMAT, "STRING");
- Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text);
- Function.Call(Hash._0x238FFE5C7B0498A6, 0, 0, 1, -1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment