public void Start() { IsRunning = true; if (!DetectivePed) { Game.DisplayNotification("Detective error, see log"); Game.LogTrivial("Detective not found"); return; } DetectivePed.IsInvincible = true; DetectivePed.IsPersistent = true; DetectivePed.BlockPermanentEvents = true; _procHost.Start(); _procHost.ActivateProcess(QuestionDisplay); }
public ProcessHostExample() { //turn on a function you like to be called in ticks procHost.ActivateProcess(CheckIfPlayerIsClose); //OR procHost[CheckIfPlayerIsClose] = true; //start processing your functions procHost.Start(); //you can also call procHost.Process() inside Process() of your callout // in such case you _don't_ call procHost.Start() }
public void Dispatch(float speed = 20f, VehicleDrivingFlags flags = VehicleDrivingFlags.Emergency) { DetectiveBlip = new Blip(DetectivePed); DetectiveBlip.SetStandardColor(CalloutStandardization.BlipTypes.Officers); DetectiveBlip.SetBlipScalePed(); DetectivePed.Tasks.DriveToPosition(TargetPosition, speed, flags, 5f); IsRunning = true; "Detective Dispatched".DisplayNotification("A ~b~detective~w~ has been ~g~dispatched~w~ to your location"); Game.DisplayHelp("Wait where you are until the ~b~detective~w~ arrives."); _processHost.Start(); _processHost.ActivateProcess(DriveFiber); }
public EvidenceController() { proc.ActivateProcess(Process); proc.Start(); }
protected void ActivateStage(Action stage) => ProcHost.ActivateProcess(stage);