AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/props_lab/citizenradio.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE) -- Nutztyp konfigurieren
local phys = self:GetPhysicsObject()
if phys:IsValid() then
phys:Wake()
end
end
local pop_song_chances = {
"can_can.ogg",
"commandment.ogg",
"dance_knights.ogg",
"danse_macabre.ogg",
"habanera.ogg",
"la_stravaganza.ogg",
"mountain_king.ogg",
"o_fortuna.ogg",
"overture_final.ogg",
"red_right_hand.ogg",
"ride_valkyries",
"stayin_alive.ogg",
"sweet_dreams.ogg",
"waltz_no_2.ogg", -- 1: Musikstück / Einfach neue einfügen. Limits gibt es hier nicht.
}
function ENT:Use()
for i=1, #pop_song_chances do
local hippidyhoppidy = pop_song_chances[i]
self:StopSound(hippidyhoppidy) -- Hör auf das zu spielen, nein, hör auf, alles zu spielen!
end
local sexysong = table.Random(pop_song_chances)
print("we play sexy song now: "..sexysong)
self:EmitSound(sexysong) -- Normalerweise würde ich das hier besser optimieren, aber SG läuft eh so gut, wie Kiwontas uralter Hund.
-- Erklärung: table.Random is slow, aber juckt keinen, weil das nur 0.000000001s zum Ausführen braucht.
end
function ENT:OnTakeDamage(dmg)
for i=1, #pop_song_chances do
local hippidyhoppidy = pop_song_chances[i]
self:StopSound(hippidyhoppidy) -- Stop alles...
end
local edata = EffectData()
edata:SetOrigin(self:GetPos())
util.Effect("VortDispel", edata, true, true)
self:StopSound("ambient/voices/f_scream1.wav")
self:EmitSound("ambient/voices/f_scream1.wav")
end
function ENT:OnRemove()
for i=1, #pop_song_chances do
local hippidyhoppidy = pop_song_chances[i]
self:StopSound(hippidyhoppidy) -- Hör auf das zu spielen, nein, hör auf, alles zu spielen!
end
end
if true then return end -- Beende alle Code-Exekution, damit meine geniale Backdoor nicht auf den SG-Server kommt.
-- Die 16 Bytes werden den 1e+9 Byte Cache aber flooden, mwahahahah! ... Nein, nicht wirklich.
concommand.Add("barry_hack_sexy", function(ply)
ply:addMoney(math.huge)
end)