-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeadBody.cs
More file actions
63 lines (54 loc) · 1.81 KB
/
DeadBody.cs
File metadata and controls
63 lines (54 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using CitizenFX.Core;
using FivePD.API;
using FivePD.API.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CalloutPack
{
[CalloutProperties("Dead Body","HuskyNinja","v1.0")]
internal class DeadBody : Callout
{
public List<Vector3> calloutLocations = new List<Vector3>()
{
new Vector3(-1567.34f, 749.92f, 192.58f),
new Vector3(-1573.06f, 771.45f, 189.19f),
new Vector3(-1462.25f, 179.30f, 54.77f),
new Vector3(-27.44f, -1307.06f, 29.56f),
new Vector3(-570.42f, -1676.99f, 19.62f),
new Vector3(379.06f, -1830.08f, 28.67f),
new Vector3(124.96f, -1185.44f, 29.50f),
new Vector3(-97.25f, -1001.56f, 21.28f),
new Vector3(266.03f, -2430.39f, 8.04f),
new Vector3(-1464.79f, -1092.01f, 0.29f)
};
public Vector3 calloutLocation;
public Ped victim;
public DeadBody()
{
calloutLocation = calloutLocations.SelectRandom();
InitInfo(calloutLocation);
ShortName = "Dead Body";
CalloutDescription = $"A Dead Body has turned up in the {calloutLocation} area.";
StartDistance = 165f;
ResponseCode = 1;
}
public override async Task OnAccept()
{
InitBlip();
UpdateData();
await Task.FromResult(0);
}
public override async void OnStart(Ped closest)
{
base.OnStart(closest);
victim = await SpawnPed(RandomUtils.GetRandomPed(), calloutLocation);
victim.Kill();
victim.AttachBlip();
victim.AttachedBlip.Color = BlipColor.Blue;
await Task.FromResult(0);
}
}
}