-
Notifications
You must be signed in to change notification settings - Fork 0
/
police_lights.txt
78 lines (64 loc) · 1.34 KB
/
police_lights.txt
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@name police lights
@inputs On Light1:wirelink Light2:wirelink
@persist E:entity Speed E1:entity E2:entity HoloEnt:entity T I Latch
@outputs
#MADE BY DIRT
interval(50)
runOnChat(1)
if (first()|duped()|dupefinished()){
E = entity()
Pos=E:pos()
E1=Light1:entity()
E2=Light2:entity()
holoCreate(1)
holoAlpha(1,0)
holoParent(1,E)
HoloEnt=holoEntity(1)
E1:deparent()
E2:deparent()
E1:propFreeze(1)
E2:propFreeze(1)
E1:setPos(E:toWorld(E:toLocal(Pos)+vec(10,0,0)))
E2:setPos(E:toWorld(E:toLocal(Pos)+vec(-10,0,0)))
E1:setAng(E:toWorld(ang(0,0,0)))
E2:setAng(E:toWorld(ang(0,180,0)))
Light1:setNumber("On",0)
Light2:setNumber("On",0)
Light1:setVector("RGB",vec(255,0,0))
Light2:setVector("RGB",vec(0,0,255))
Light1:setNumber("Brightnes",255)
Light2:setNumber("Brightnes",255)
Light1:setNumber("Distance",3000)
Light2:setNumber("Distance",3000)
Light1:setNumber("FOV",170)
Light2:setNumber("FOV",170)
}
I++
if (I==5){
E1:parentTo(HoloEnt)
E2:parentTo(HoloEnt)
}
if (I<=10){
T=0
}
if(On&~On){ Latch=!Latch}
if(Latch){
T=T+30
Light1:setNumber("On",1)
Light2:setNumber("On",1)
holoAng(1,E:toWorld(ang(0,T,0)))
Latch=1
}
if(!Latch)
{
Light1:setNumber("On",0)
Light2:setNumber("On",0)
Latch=0
}
LastSaid=owner():lastSaid():explode(" ")
if(chatClk(owner())&LastSaid[1,string]=="!reset")
{reset()}
if (last()) {
E1:deparent()
E2:deparent()
}