move all files, massive overhaul of Printer Bank Manager

This commit is contained in:
Xevion
2019-12-20 19:38:33 -06:00
parent 91a6661616
commit dbf1ed92ae
13 changed files with 1094 additions and 143 deletions
+224
View File
@@ -0,0 +1,224 @@
@name Fozie's Alarm System
@inputs
@outputs
@persist [Foz Config Help Allowed]:table
@trigger
if(first()){
#[-----------------------------------------
Name: Config
-----------------------------------------]#
Config = table()
Config["alarm_sound", string] = "ambient/alarms/apc_alarm_loop1.wav" # This is the sound that'll play when somebody trips the alarm,
Config["alarm_dur", number] = 10 # The length that the alarm will sound off
Config["cmd_min", string] = "min" # This is the command to set the min value for the cube.
Config["cmd_max", string] = "max" # This is the command to set the max value for the cube.
Config["cmd_show", string] = "show" # This is make the hologram show instead of hide.
Config["cmd_hide", string] = "hide" # This is make the hologram hide instead of show.
Config["cmd_add", string] = "add" # This will add somebody to the whitelist.
Config["cmd_remove", string] = "remove" # This will remove somebody to the whitelist.
Config["cmd_help", string] = "help" # This is the command to display the help commands.
Config["prefix", string] = "!" # This is the prefix for the commands.
#[-----------------------------------------
Name: Setup
-----------------------------------------]#
function fancyPrint(Text:string){
printColor(vec(100, 100, 100), "[", vec(120, 255, 0), "Alarm-System", vec(100, 100, 100), "]: ", vec(255, 255, 255), Text)
}
runOnChat(1)
holoCreate(1)
holoColor(1, vec4(120, 255, 0, 100))
holoVisible(1, players(), 0)
holoDisableShading(1, 1)
Foz["min", vector] = vec()
Foz["max", vector] = vec()
Foz["show", number] = 0 # Bool
Foz["alarm", number] = 0 # Bool
#Allowed[owner():steamID(), number] = 1
#[-----------------------------------------
Name: Commands
-----------------------------------------]#
Help = table()
Help[Config["prefix", string] + Config["cmd_min", string], string] = "This will set the min value for the detection cube."
Help[Config["prefix", string] + Config["cmd_max", string], string] = "This will set the max value for the detection cube."
Help[Config["prefix", string] + Config["cmd_show", string], string] = "This show the hologram."
Help[Config["prefix", string] + Config["cmd_hide", string], string] = "This hide the hologram."
Help[Config["prefix", string] + Config["cmd_add", string], string] = "This will add somebody to your whitelist."
Help[Config["prefix", string] + Config["cmd_remove", string], string] = "This will remove somebody from your whitelist."
Help[Config["prefix", string] + Config["cmd_help", string], string] = "This will returtn a list of commands."
}
interval(100)
#[-----------------------------------------
Name: Chat
-----------------------------------------]#
if(chatClk(owner())){
local Ex = lastSaid():explode(" ")
if(Ex[1, string] == Config["prefix", string] + Config["cmd_help", string]){
hideChat(1)
fancyPrint("Here's a list of commands.")
foreach(K, V:string = Help){
fancyPrint(K + " - " + V)
}
}
if(Ex[1, string] == Config["prefix", string] + Config["cmd_min", string]){
hideChat(1)
Foz["min", vector] = owner():aimPos()
fancyPrint("Set the minimum value to: " + round(Foz["min", vector], 2))
}
if(Ex[1, string] == Config["prefix", string] + Config["cmd_max", string]){
hideChat(1)
Foz["max", vector] = owner():aimPos()
fancyPrint("Set the maximum value to: " + round(Foz["max", vector], 2))
}
if(Ex[1, string] == Config["prefix", string] + Config["cmd_show", string]){
hideChat(1)
if(Foz["show", number]){
fancyPrint("Already showing the hologram. Make sure that the min and max values are set!")
}
else{
Foz["show", number] = 1
fancyPrint("Showing the hologram. (Note, the hologram will not show if the min or max value is not set.)")
holoVisible(1, players(), Foz["show", number])
}
}
if(Ex[1, string] == Config["prefix", string] + Config["cmd_hide", string]){
hideChat(1)
if(!Foz["show", number]){
fancyPrint("Already hiding the hologram. Make sure that the min and max values are set!")
}
else{
Foz["show", number] = 0
fancyPrint("Hiding the hologram. (Note, the hologram will not show if the min or max value is not set.)")
holoVisible(1, players(), Foz["show", number])
}
}
if(Ex[1, string] == Config["prefix", string] + Config["cmd_add", string]){
hideChat(1)
local Ply = findPlayerByName(Ex[2, string])
if(Ply:isPlayer()){
if(Allowed[Ply:steamID(), number]){
fancyPrint(Ply:name() + " is already on the whitelist!")
}
else{
fancyPrint("Added " + Ply:name() + " to the whitelist.")
Allowed[Ply:steamID(), number] = 1
}
}
else{
fancyPrint("Sorry, but I couldn't find player: " + Ex[2, string])
}
}
if(Ex[1, string] == Config["prefix", string] + Config["cmd_remove", string]){
hideChat(1)
local Ply = findPlayerByName(Ex[2, string])
if(Ply:isPlayer()){
if(!Allowed[Ply:steamID(), number]){
fancyPrint(Ply:name() + " isn't on the whitelist!")
}
else{
fancyPrint("Removed " + Ply:name() + " from the whitelist.")
Allowed[Ply:steamID(), number] = 0
}
}
else{
fancyPrint("Sorry, but I couldn't find player: " + Ex[2, string])
}
}
}
#[-----------------------------------------
Name: Hologram
-----------------------------------------]#
if(changed(Foz["min", vector]) & Foz["min", vector] & Foz["max", vector] | changed(Foz["max", vector]) & Foz["min", vector] & Foz["max", vector]){
local Scale = (Foz["min", vector] - Foz["max", vector])
holoScaleUnits(1, Scale)
holoPos(1, (Foz["min", vector] + Foz["max", vector]) / 2)
}
#[-----------------------------------------
Name: Detection
-----------------------------------------]#
if(Foz["min", vector] & Foz["max", vector]){
findIncludeClass("Player")
findInBox(Foz["min", vector], Foz["max", vector])
local Ents = findToArray()
local Intruders = table()
foreach(K, V:entity = Ents){
if(!Allowed[V:steamID(), number] & !Foz["alarm", number]){
Intruders:pushEntity(V)
}
}
if(!Foz["alarm", number]){
local Count = Intruders:count()
local Str = ""
for(I=1, Count){
local V = Intruders[I, entity]
if(I == Count){
Str = Str + V:name()
}
else{
Str = Str + V:name() + ", "
}
}
if(Count >= 1){
Foz["alarm", number] = 1
fancyPrint("Alarm was tripped by " + Str + ".")
soundPlay(1, Config["alarm_dur", number], Config["alarm_sound", string])
timer("alarm_on", Config["alarm_dur", number] * 1000)
}
}
}
if(clk("alarm_on")){
Foz["alarm", number] = 0
}
#[-----------------------------------------
Made By Fozie!
SteamID: STEAM_0:0:226129070
Profile: http://steamcommunity.com/profiles/76561198412523868
Discord: Fozie#5014
-----------------------------------------]#
+268
View File
@@ -0,0 +1,268 @@
@name Holo Jet Above Head
@outputs Fire
@inputs V:vector
@persist [E O]:entity Fire
if(first()){
E=entity()
O=owner()
M="phoenix_storms/metal_plate"
M2="phoenix_storms/metalbox2"
E:setAlpha(0)
runOnTick(1)
holoCreate(1)
holoPos(1,E:pos())
holoModel(1,"hqcylinder2")
holoAng(1,ang(0,90,90))
holoScale(1, vec(0.5 * S, .2 * S, 1 * S))
holoParent(1,E)
holoMaterial(1,M)
holoCreate(2)
holoPos(2,E:pos()+vec(9,0,0))
holoModel(2,"hqcone")
holoAng(2,ang(0,90,90))
holoScale(2, vec(0.5 * S, .2 * S, .5 * S))
holoParent(2,E)
holoMaterial(2,M)
holoCreate(3)
holoPos(3,E:pos()+vec(2,0,0))
holoModel(3,"cube")
holoAng(3,ang(0,90,90))
holoScale(3, vec(1.5 * S, .05 * S, .3 * S))
holoParent(3,E)
holoMaterial(3,M2)
holoColor(3,vec(75,75,75))
holoCreate(4)
holoPos(4,E:pos()+vec(2,-10.5,0))
holoModel(4,"pyramid")
holoAng(4,ang(0,0,90))
holoScale(4, vec(0.3 * S, .05 * S, .25 * S))
holoParent(4,E)
holoMaterial(4,M2)
holoColor(4,vec(155,155,155))
holoCreate(5)
holoPos(5,E:pos()+vec(2,10.5,0))
holoModel(5,"pyramid")
holoAng(5,ang(0,180,90))
holoScale(5, vec(0.3 * S, .05 * S, .25 * S))
holoParent(5,E)
holoMaterial(5,M2)
holoColor(5,vec(155,155,155))
holoCreate(6)
holoPos(6,E:pos()+vec(2,5,-1.2))
holoModel(6,"hqcylinder2")
holoAng(6,ang(0,90,90))
holoScale(6, vec(0.1 * S, .1 * S, .3 * S))
holoParent(6,E)
holoMaterial(6,M)
holoCreate(7)
holoPos(7,E:pos()+vec(2,-5,-1.2))
holoModel(7,"hqcylinder2")
holoAng(7,ang(0,90,90))
holoScale(7, vec(0.1 * S, .1 * S, .3 * S))
holoParent(7,E)
holoMaterial(7,M)
holoCreate(8)
holoPos(8,E:pos()+vec(2,-7,-1.6))
holoModel(8,"hqcylinder2")
holoAng(8,ang(0,90,90))
holoScale(8, vec(0.1 * S, .1 * S, .3 * S))
holoParent(8,E)
holoMaterial(8,M)
holoCreate(9)
holoPos(9,E:pos()+vec(2,7,-1.6))
holoModel(9,"hqcylinder2")
holoAng(9,ang(0,90,90))
holoScale(9, vec(0.1 * S, .1 * S, .3 * S))
holoParent(9,E)
holoMaterial(9,M)
holoCreate(10)
holoPos(10,E:pos()+vec(0.1,0,1))
holoModel(10,"hqcylinder2")
holoAng(10,ang(0,90,90))
holoScale(10, vec(0.2 * S, .2 * S, .42 * S))
holoParent(10,E)
holoMaterial(10,M)
holoCreate(11)
holoPos(11,E:pos()+vec(-3.5,0,0.8))
holoModel(11,"hqcylinder2")
holoAng(11,ang(0,90,80))
holoScale(11, vec(0.2 * S, .2 * S, .3 * S))
holoParent(11,E)
holoMaterial(11,M)
holoCreate(12)
holoPos(12,E:pos()+vec(4,0,0.8))
holoModel(12,"hqcylinder2")
holoAng(12,ang(0,90,-80))
holoScale(12, vec(0.2 * S, .2 * S, .3 * S))
holoParent(12,E)
holoMaterial(12,M)
holoCreate(13)
holoPos(13,E:pos()+vec(6,0,0.8))
holoModel(13,"dome2")
holoAng(13,ang(0,90,10))
holoScale(13, vec(0.2 * S, .5 * S, .2 * S))
holoColor(13,vec(0,0,255))
holoAlpha(13,(225))
holoParent(13,E)
holoCreate(14)
holoPos(14,E:pos()+vec(-7.7,0,0))
holoModel(14,"hqcone")
holoAng(14,ang(0,90,-90))
holoScale(14, vec(0.5 * S, .2 * S, .3 * S))
holoParent(14,E)
holoMaterial(14,M)
holoCreate(15)
holoPos(15,E:pos()+vec(-7.7,0,1.1))
holoModel(15,"prism")
holoAng(15,ang(45,0,180))
holoScale(15, vec(0.5 * S, .05 * S, .3 * S))
holoParent(15,E)
holoMaterial(15,M)
holoCreate(16)
holoPos(16,E:pos()+vec(-5,0,0.5))
holoModel(16,"hqcylinder2")
holoAng(16,ang(0,90,80))
holoScale(16, vec(0.2 * S, .2 * S, .3 * S))
holoParent(16,E)
holoMaterial(16,M)
holoCreate(17)
holoPos(17,E:pos()+vec(4.3,5,-1.2))
holoModel(17,"cone")
holoAng(17,ang(0,90,90))
holoScale(17, vec(0.1 * S, .1 * S, .1 * S))
holoParent(17,E)
holoMaterial(17,M)
holoCreate(18)
holoPos(18,E:pos()+vec(4.3,-5,-1.2))
holoModel(18,"cone")
holoAng(18,ang(0,90,90))
holoScale(18, vec(0.1 * S, .1 * S, .1 * S))
holoParent(18,E)
holoMaterial(18,M)
holoCreate(19)
holoPos(19,E:pos()+vec(4.3,-7,-1.6))
holoModel(19,"cone")
holoAng(19,ang(0,90,90))
holoScale(19, vec(0.1 * S, .1 * S, .1 * S))
holoParent(19,E)
holoMaterial(19,M)
holoCreate(20)
holoPos(20,E:pos()+vec(4.3,7,-1.6))
holoModel(20,"cone")
holoAng(20,ang(0,90,90))
holoScale(20, vec(0.1 * S, .1 * S, .1 * S))
holoParent(20,E)
holoMaterial(20,M)
holoCreate(21)
holoPos(21,E:pos()+vec(2,5,-0.8))
holoModel(21,"cube")
holoAng(21,ang(0,90,90))
holoScale(21, vec(0.05 * S, .14 * S, .15 * S))
holoParent(21,E)
holoMaterial(21,M)
holoCreate(22)
holoPos(22,E:pos()+vec(2,-5,-0.8))
holoModel(22,"cube")
holoAng(22,ang(0,90,90))
holoScale(22, vec(0.05 * S, .14 * S, .15 * S))
holoParent(22,E)
holoMaterial(22,M)
holoCreate(23)
holoPos(23,E:pos()+vec(2,-7,-0.7))
holoModel(23,"cube")
holoAng(23,ang(0,90,90))
holoScale(23, vec(0.05 * S, .14 * S, .12 * S))
holoParent(23,E)
holoMaterial(23,M)
holoCreate(24)
holoPos(24,E:pos()+vec(2,7,-0.7))
holoModel(24,"cube")
holoAng(24,ang(0,90,90))
holoScale(24, vec(0.05 * S, .14 * S, .12 * S))
holoParent(24,E)
holoMaterial(24,M)
holoCreate(25)
holoPos(25,E:pos()+vec(-7,0,1))
holoModel(25,"cube")
holoAng(25,ang(0,90,90))
holoScale(25, vec(0.75 * S, .05 * S, .3 * S))
holoParent(25,E)
holoMaterial(25,M2)
holoColor(25,vec(75,75,75))
holoCreate(26)
holoPos(26,E:pos()+vec(-7,-5,1))
holoModel(26,"pyramid")
holoAng(26,ang(0,0,90))
holoScale(26, vec(0.3 * S, .05 * S, .1 * S))
holoParent(26,E)
holoMaterial(26,M2)
holoColor(26,vec(155,155,155))
holoCreate(27)
holoPos(27,E:pos()+vec(-7,5,1))
holoModel(27,"pyramid")
holoAng(27,ang(0,180,90))
holoScale(27, vec(0.3 * S, .05 * S, .1 * S))
holoParent(27,E)
holoMaterial(27,M2)
}
if(O:keyAttack2()){
Fire=1
}else{
Fire=0
}
if(duped()){
concmd("say Made by Tomo742 and you cannot haz naughty duper")
timer("selfdestruct",100)
}
if(clk("selfdestruct")){
selfDestruct()
}
##############################
if(->V){
Target=V
}else{
if(!O:keyUse()){
#STABILISE
TarQ = quat(O:eyeAngles()) #Calculate quaternion for target orientation
CurQ = quat(E) #Calculate current orientation quaternion
#TarQ/CurQ is a quaternion representing the rotation that will rotate the object from current orientation to the target one.
Q = TarQ/CurQ
#applyTorque() works on intrinsic vectors! Get the rotation vector and transform it.
EP=E:pos()
TTV = E:toLocal(rotationVector(Q)+EP)
#Alternatively, can use "V = transpose(matrix(E))*rotationVector(Q)"
#Apply torque. angVelVector() works like a delta term.
#Factors 150 and 12 can be adjusted to achieve best effect.
E:applyTorque((150*TTV - 12*E:angVelVector())*E:inertia())
Target=O:shootPos()+vec(0,0,100) # Above the owner's head.
}elseif(O:keyUse()){
#STABILISE
TarQ = quat(O:eyeAngles()) #Calculate quaternion for target orientation
CurQ = quat(E) #Calculate current orientation quaternion
#TarQ/CurQ is a quaternion representing the rotation that will rotate the object from current orientation to the target one.
Q = TarQ/CurQ
#applyTorque() works on intrinsic vectors! Get the rotation vector and transform it.
EP=E:pos()
TTV = E:toLocal(rotationVector(Q)+EP)
#Alternatively, can use "V = transpose(matrix(E))*rotationVector(Q)"
#Apply torque. angVelVector() works like a delta term.
#Factors 150 and 12 can be adjusted to achieve best effect.
E:applyTorque((150*TTV - 12*E:angVelVector())*E:inertia())
Target=O:aimPos()+vec(0,0,100) # Above where the owner is looking.
}
}
E:applyForce(((Target-E:pos())*10-E:vel())*E:mass())
+80
View File
@@ -0,0 +1,80 @@
@name KOS Sign
@inputs E:wirelink
@outputs
timer("Reset",60000)
function mainScreen(){
E:egpClear()
E:egpBox(16,vec2(256,350),vec2(740,350))
E:egpColor(16,vec(1,200,255))
E:egpMaterial(16, "models/shadertest/shader3")
E:egpBox(15,vec2(256,350),vec2(740,350))
E:egpColor(15,vec(1,200,255))
E:egpAlpha(15,55)
E:egpText(1,owner():name():left(13)+"'s Base",vec2(256,220))
E:egpFont(1,"coolvetica",75)
E:egpAlign(1,1,1)
E:egpColor(1,vec(0,0,0))
E:egpText(2,"You Are KOS Beyond This Point",vec2(256,275))
E:egpFont(2,"coolvetica",50)
E:egpAlign(2,1,1)
E:egpColor(2,vec(255,0,0))
E:egpText(3,"You Are Also KOS If:",vec2(256,320))
E:egpFont(3,"coolvetica",50)
E:egpAlign(3,1,1)
E:egpColor(3,vec(255,255,255))
E:egpText(4,"1. Holding Raiding Tools",vec2(256,360))
E:egpFont(4,"coolvetica",50)
E:egpAlign(4,1,1)
E:egpColor(4,vec(255,255,255))
E:egpText(5,"2. Suspicious Actions",vec2(256,420))
E:egpFont(5,"coolvetica",50)
E:egpAlign(5,1,1)
E:egpColor(5,vec(255,255,255))
E:egpText(6,"3. Preparing to raid",vec2(256,480))
E:egpFont(6,"coolvetica",50)
E:egpAlign(6,1,1)
E:egpColor(6,vec(255,255,255))
E:egpBox(7,vec2(-100,346),vec2(35,393))
E:egpColor(7,vec(200,0,0))
E:egpBox(8,vec2(610,346),vec2(35,393))
E:egpColor(8,vec(200,0,0))
E:egpBox(9,vec2(256,525),vec2(700,35))
E:egpColor(9,vec(200,0,0))
E:egpBox(10,vec2(256,167),vec2(700,35))
E:egpColor(10,vec(200,0,0))
E:egpBox(11,vec2(256,167),vec2(710,5))
E:egpColor(11,vec(1,200,255))
E:egpBox(12,vec2(256,525),vec2(710,5))
E:egpColor(12,vec(1,200,255))
E:egpBox(13,vec2(610,346),vec2(5,362))
E:egpColor(13,vec(1,200,255))
E:egpBox(14,vec2(-100,346),vec2(5,362))
E:egpColor(14,vec(1,200,255))
}
if(first()){
entity():createWire(entity():isWeldedTo(),"E","wirelink")
mainScreen()
}
if(clk("Reset")){
reset()
mainScreen()
}
+317
View File
@@ -0,0 +1,317 @@
@name Radio v.3
@inputs
@outputs Length
@persist Length Mode Temp Count Holo:entity [USE_KEY OPEN_MENU_KEY]:string Menu OO:entity Test:vector Holo_Aim:entity Key Active [TempVec]:vector [Inside Outside Hover]:vector4
@persist RadioSender:array
@trigger none
interval(140)
runOnChat(1)
runOnLast(1)
E = entity()
Ply = players()
O = owner()
Last = O:lastSaid():explode(" ")
########################################################################################################################################################################
if(first()){
Menu = 0
#Colors
Inside = vec4(0,0,0,255)
Outside = vec4(255,255,255,255)
Hover = vec4(200,200,200,255)
#Settings
Mode = 1 # 1 = The Menu Will Follow You || 2 = The Menu Will Stay Where You Opened It
Model = "models/sprops/geometry/fhex_18.mdl" #models/sprops/geometry/fhex_18.mdl - octagon
Count = 4 # 1 - 9
TMat = "models/debug/debugwhite" #Material
Radius = 16.75 #Radius
Scale_Mul = 0.6 #Scaling Mul
Outline = 1.02#1.05 #outline size
USE_KEY = "E" #Use key
OPEN_MENU_KEY = "g" #Use key
Rotation = 180 #Rotates outerprops around the center
Center = 1 #1 = holo in center || 0 = no holo
CenterS = 1 #The size of the center prop
Scaling = vec(1.5,0.3,1.5)*Scale_Mul
Center_Scaling = Scaling*CenterS
Angle_Offset = ang(0,90,0)
RadioSender[1,string] = "http://stream01.iloveradio.de/iloveradio1.mp3"
RadioSender[2,string] = "http://stream.sunshine-live.de/live/mp3-192/Webradio-Player/"
RadioSender[3,string] = "http://mp3.ad.mdn.nacamar.net/ps-radiogalaxy/livestream.mp3"
RadioSender[4,string] = "http://online.radiorecord.ru:8102/club_128"
streamVolume(1,1000)
streamRadius(1,1000)
streamDisable3D(1)
entity():propShadow(0)
entity():propNotSolid(1)
entity():propDraw(0)
function entity c(Index:number,Posi:vector,Scale:vector,Angle:angle,Colo:vector,Model:string,Material:string,Parent:entity,Alpha:number){
holoCreate(Index) holoPos(Index,Posi) holoScale(Index,Scale) holoAng(Index,Angle) holoColor(Index,Colo) holoModel(Index,Model) holoMaterial(Index,Material)
holoParent(Index,Parent) holoAlpha(Index,Alpha)
return holoEntity(Index)
}
function number chat(N,S:string){
return (chatClk(owner())&owner():lastSaid():explode(" "):string(N)==S)
}
function printC(S:string){
printColor(vec(255),"[ ",vec(255,0,0),"E2",vec(255)," ] ",vec(255,255,0),S)
}
function opri(Message2:string,ColorM2:vector){
printColor(vec(255),"[",vec(255,0,0),"RDv3",vec(255),"] ",vec(255,255,0),ColorM2,Message2)
}
function string formatname(URL:string) {
local Path = URL:explode("//")
local File = Path[Path:count(), string]:replace(".mp3", " ")
local File = File:right(File:length()-0)
return File:replace("%20", " ")
}
function streamPlay(Ent:entity,Index:number,SoundArt:array,SoundName:string,SoundN:number) {
Ent:streamStart(Index,SoundArt[SoundN,string],1000)
opri(SoundName+" Nr."+SoundN+" ["+formatname(SoundArt[SoundN,string])+"]",vec(255,255,0))
}
function void drawText(String:string,Index,Holo:entity,Scale,Case){
c(1000,Holo:pos()+vec(10,0,0),vec(1,0.1,3),ang(90,0,0),vec(0),"","",noentity(),255)
holoDisableShading(1000,1)
c(1001,Holo:pos()+vec(10,0,0),-vec(1.03,0.12,3.03),ang(90,0,0),vec(0),"","",holoEntity(1000),255)
holoColor(1001,Outside)
holoDisableShading(1001,1)
String = String:replace(" ","")
String = String:sub(1,10)
Explode = String:explode("")
Length = Explode:count()
for(I=1,Length){
if(Case==0){
c(Index+I,holoEntity(1000):pos() +vec(I*3.2 - 19,0,0),vec(Scale)+vec(0,0.4,0),ang(0,180,0),vec(0),"models/sprops/misc/alphanum/alphanum_l_"+Explode[I,string]+".mdl","models/debug/debugwhite",holoEntity(1000),255)
}
elseif(Case==1){
c(Index+I,holoEntity(1000):pos() +vec(I*3.2 - 19,0,0),vec(Scale)+vec(0,0.4,0),ang(0,180,0),vec(0),"models/sprops/misc/alphanum/alphanum_"+Explode[I,string]+".mdl","models/debug/debugwhite",holoEntity(1000),255)
}
holoDisableShading(Index+I,1)
holoColor(Index+I,Outside)
}
holoPos(1000,Holo:pos()-Holo:right()*45)
#holoAng(1000,Holo:angles()+ang(10,60,0))
holoAng(1000,ang(60,90,0) + (owner():pos() - holoEntity(1000):pos()):toAngle())
holoParent(1000,Holo)
}
function void hideText(Index){
holoPos(1000,vec(0))
for(I=1,Length){
holoAlpha(Index+I,0)
}
}
function void button(Button){
switch(Button){
#Button 1 is pressed
case 1,
hideText(500)
drawText("iloveradio",500,holoEntity(900),0.3,1)#String Text, Starting Holo Index, Base Menu Holo, Scale, Lower-Upper Case.
streamPlay(holoEntity(12687),1,RadioSender,"Radio",1)
break
#Button 2 is pressed
case 2,
hideText(500)
drawText("sunshine",500,holoEntity(900),0.3,1)#String Text, Starting Holo Index, Base Menu Holo, Scale, Lower-Upper Case.
streamPlay(holoEntity(12687),1,RadioSender,"Radio",2)
break
#Button 3 is pressed
case 3,
hideText(500)
drawText("radiogalaxy",500,holoEntity(900),0.3,1)#String Text, Starting Holo Index, Base Menu Holo, Scale, Lower-Upper Case.
streamPlay(holoEntity(12687),1,RadioSender,"Radio",3)
break
#Button 4 is pressed
case 4,
hideText(500)
drawText("club 128",500,holoEntity(900),0.3,1)#String Text, Starting Holo Index, Base Menu Holo, Scale, Lower-Upper Case.
streamPlay(holoEntity(12687),1,RadioSender,"Radio",4)
break
#Button 5 is pressed
case 5,
hideText(500)
#drawText("5",500,holoEntity(900),0.3,1)#String Text, Starting Holo Index, Base Menu Holo, Scale, Lower-Upper Case.
streamStop(1)
break
}
}
function holoMenu(){
if(first()){
c(0,vec(0),vec(1),ang(0),vec(255),"models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl","",noentity(),255)
holoDisableShading(0,1)
holoScaleUnits(0,vec(0))
c(12687,owner():shootPos()+vec(0,0,10),vec(0),ang(90,0,0),vec(0),"","",owner(),0)
#Menu
HCenter = E:pos() + vec(0,0,60) #+ owner():forward()*50
c(900,HCenter,vec(1),ang(90,0,0),vec(255),"models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl",TMat,noentity(),0)
holoScaleUnits(900,vec(1))
if(Center){
c(200+Count+1,HCenter,Center_Scaling,Angle_Offset,vec(0),Model,TMat,holoEntity(900),255) holoColor(200+Count+1,Inside)
c(101,HCenter,-Center_Scaling*Outline,Angle_Offset,vec(0),Model,TMat,holoEntity(900),255) holoColor(101,Outside)
holoDisableShading(200+Count+1,1) holoDisableShading(101,1)
}
#holoScale(0, vec(1,1,0.1))
#holoAng(0, entity():toWorld(ang(-40,0,0)))
for(I=201,200+Count){
Temp = Temp + 1
#print(I)
local TempVec = Radius * vec(cos(I*(360/Count)),sin(I*(360/Count)),0):rotate(holoEntity(900):angles()+ang(Rotation,-90,-90)) + holoEntity(900):pos()
c(I,TempVec,Scaling,Angle_Offset,vec(0),Model,TMat,holoEntity(900),255)
holoColor(I,Inside)
c(I+50,holoEntity(I):pos(),-Scaling*Outline,holoEntity(I):angles(),vec(0),holoEntity(I):model(),TMat,holoEntity(I),255)
holoColor(I+50,Outside)
holoDisableShading(I+50,1)
String = "models/sprops/misc/alphanum/alphanum_"+(Temp):toString()+".mdl"
#print(Temp)0
#print(String)
holoCreate(I+100,holoEntity(I):pos(),vec(0.7),holoEntity(I):angles()+ang(0,180,0),vec(255),"models/sprops/misc/alphanum/alphanum_"+Temp:toString()+".mdl")
holoMaterial(I+100,TMat)
holoDisableShading(I+100,1)
holoParent(I+100,I)
}
rangerPersist(1)
rangerFilter(owner())
Holo = holoEntity(900)
}
local Key = owner():keyPressed(OPEN_MENU_KEY)
if(changed(Key) & Key){
Active = !Active
if(!Active){
holoPos(900,vec(0))
Counter = 0
}
TempVec = owner():pos() + vec(0,0,50) + owner():forward()*80
TempAng = holoEntity(900):angles()
}
if(changed(Active) & Active == 1){
Aim=rangerOffset(100, owner():shootPos(), owner():eye())
holoPos(900, Aim:position())
}
if(Active){
if(Mode==1){
holoPos(900,owner():pos() + vec(0,0,50) + owner():forward()*80)
holoAng(900,ang(45,0,0) + (owner():pos() - holoEntity(900):pos()):toAngle())
#holoAng(1000,ang(0,0,0) + (owner():pos() - holoEntity(900):pos()):toAngle())
holoAng(0,holoEntity(900):angles())
}elseif(Mode==2){
holoPos(900,TempVec)
holoAng(900,ang(45,0,0) + (owner():pos() - holoEntity(900):pos()):toAngle())
#holoAng(1000,ang(60,90,0) + (owner():pos() - holoEntity(1000):pos()):toAngle())
holoAng(0,holoEntity(900):angles())
}
ShootPos = owner():shootPos()
EyeDir = owner():eye()
#How does line-plane intersection work?
PlanePoint = Holo:pos() #Get a point in the plane
Normal = Holo:up() #Get the normal (a vector perpendicular to the surface) of the plane
LinePoint1 = ShootPos #Get a point on the line
LinePoint2 = ShootPos+EyeDir #Get a point on the line "after" point 1#
X = (Normal:dot(PlanePoint-LinePoint1))/(Normal:dot(LinePoint2-LinePoint1)) #Not really sure how, but it returns how many times the distance from point 1 to point 2 you need to go from point 1 to reach the intersection
Vec = LinePoint1+X*(LinePoint2-LinePoint1) #Get the intersections position using f(X) = LinePoint1+X*(LinePoint2-LinePoint1)
#
holoPos(0,Vec)
for(I=201,200+Count+1){
if(Vec:distance(holoEntity(I):pos())<8){
holoColor(I,Hover)
if(changed(owner():keyPressed(USE_KEY))&owner():keyPressed(USE_KEY)){
button(I-200)
}
}else{
holoColor(I,Inside)
}
}
}else{
holoPos(0,vec(0))
}
}
########################################################################################################################################################################
function runE2(){
holoMenu()
}
}
if(last()){ propDeleteAll() streamStop(1) }
########################################################################################################################################################################
if(opcounter()<(softQuota()) & perf()){
runE2()
}
+44
View File
@@ -0,0 +1,44 @@
@name SilentHillAlarm By Fatality
@outputs Input Text:string AlarmColor:vector BackgroundTextColor:vector LightStatus:number
@persist LightStatus:number
interval(1000)
runOnChat(1)
if(first()) {
streamRadius(1,1000)
streamVolume(1,1000)
streamDisable3D(1)
Mode = 0
}
if(Mode == 1) {
LightStatus++
if(LightStatus == 2) {
LightStatus = 0
}
}
if(chatClk(owner())) {
LS = lastSaid():lower():explode(" ")
if(LS[1, string] == "!sirenon") {
if(Mode == 0) {
#Link = "https://www.dropbox.com/s/rzm1pvto4pi71s8/SilentHillSirenFinal.mp3?dl=1"
Link = "https://www.dropbox.com/s/7l6v3nync6cq575/oki doki boomer.mp3?dl=0&raw=1"
entity():streamStart(1,Link)
Input = 1
Text = "Warning: Breach Detected!"
AlarmColor = vec(255,0,0)
BackgroundTextColor = vec(0,0,0)
}
} elseif(LS[1, string] == "!sirenoff") {
if(Mode == 1) {
streamStop(1)
Input = 0
Text = "Status: Green"
AlarmColor = vec(0,255,0)
BackgroundTextColor = vec(255,255,255)
}
}
}