Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SequenceTask
- {
- private int handle;
- public int Handle => handle;
- public SequenceTask()
- {
- NativeFunction.Natives.OpenSequenceTask(ref handle);
- }
- public int Progress(Ped ped) => NativeFunction.Natives.GetSequenceProgress(ped);
- public void Close()
- {
- NativeFunction.Natives.CloseSequenceTask(handle);
- }
- public void Clear()
- {
- NativeFunction.Natives.ClearSequenceTask(ref handle);
- }
- public bool Repeat
- {
- set => NativeFunction.Natives.SetSequenceToRepeat(handle, value);
- }
- public void Perform(Ped ped)
- {
- NativeFunction.Natives.TaskPerformSequence(ped, handle);
- }
- public void Perform(Ped ped, int currentProgress, int progress)
- {
- NativeFunction.Natives.TaskPerformSequenceFromProgress(ped, handle, currentProgress, progress);
- }
- //example
- //var sequence = new SequenceTask();
- //NativeFunction.Natives.TASK_PLAY_ANIM(0, "missexile2", "enter_crouch_b", 8f, -8f, -1, 1032, 0, 0, 0, 0);
- //sequence.Close();
- //sequence.Perform(Game.LocalPlayer.Character);
- //sequence.Clear();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement