This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 8064ba84d8
commit 6a58f406b1
7522 changed files with 4011896 additions and 15 deletions

View File

@@ -0,0 +1,54 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
surface.CreateFont( "arcade_font20", {
font = "Calibri",
size = 20,
weight = 100
})
surface.CreateFont( "arcade_font25", {
font = "Calibri",
size = 25,
weight = 100
})
surface.CreateFont( "arcade_font30", {
font = "Calibri",
size = 30,
weight = 100
})
surface.CreateFont( "arcade_font60", {
font = "Calibri",
size = 60,
weight = 100
})
surface.CreateFont( "arcade_font80", {
font = "Calibri",
size = 80,
weight = 100
})
surface.CreateFont( "arcade_font120", {
font = "Calibri",
size = 120,
weight = 100
})
net.Receive("arcade_adjust_timer", function()
local timers = {
"PacMan_CloseTime",
"PONG_CloseTime",
"Space_CloseTime"
}
for k, v in pairs(timers) do
if (timer.Exists(v)) then
timer.Adjust(v, (ix.config.Get("arcadeTime")) + timer.TimeLeft(v), 1)
end
end
end)

View File

@@ -0,0 +1,123 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
net.Receive("arcade_request_pacman", function()
local frame = vgui.Create("DFrame")
frame:SetSize(300, 125)
frame:Center()
frame:MakePopup()
frame:SetDraggable(false)
frame:SetTitle("")
frame:ShowCloseButton(false)
frame.Paint = function(self, w, h)
Derma_DrawBackgroundBlur(frame, 4)
draw.RoundedBox(0, 0, 0, w, h, Color(0,0,0,100))
draw.RoundedBox(0, 0, 0, w, 15, Color(25,25,25,255))
draw.SimpleText(ix.config.Get("arcadePrice").." Krediye PACMAN oyna?", "arcade_font30", w/2, h/4, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local accept = vgui.Create("DButton", frame)
accept:SetPos(5, 50)
accept:SetSize(140,70)
accept:SetText("")
accept.DoClick = function()
frame:Close()
net.Start("arcade_accept_pacman")
net.SendToServer()
end
accept.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(0,100,0))
draw.SimpleText("Kredi Ekle", "arcade_font30", w/2, h/2, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local deny = vgui.Create("DButton", frame)
deny:SetPos(155, 50)
deny:SetSize(140,70)
deny:SetText("")
deny.DoClick = function()
frame:Close()
end
deny.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(100,0,0))
draw.SimpleText("Vazgeç", "arcade_font30", w/2, h/2, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
end)
net.Receive("arcade_open_pacman", function()
local frame = vgui.Create("DFrame")
frame:SetSize(ScrH()*0.95, ScrH()*0.95+25)
frame:Center()
frame:MakePopup()
frame:SetDraggable(false)
frame:SetTitle("")
frame:ShowCloseButton(false)
if !ix.config.Get("arcadeDisableTokenSystem") then
timer.Create("PacMan_CloseTime", (ix.config.Get("arcadeTime")*ix.config.Get("arcadePrice")), 1, function() frame:Close() end)
end
frame.Paint = function(self, w, h)
Derma_DrawBackgroundBlur(frame, 4)
draw.RoundedBox(0, 0, 0, w, 50, Color(0,0,0,100))
draw.RoundedBox(0, 0, 0, w, 15, Color(25,25,25,255))
-- draw.RoundedBox(0, 0, 0, w, 65, Color(200,200,200))
if !ix.config.Get("arcadeDisableTokenSystem") then
local timeleft = string.FormattedTime(timer.TimeLeft("PacMan_CloseTime"))
local extranum
if timeleft.s < 10 then
extranum = 0
else
extranum = ""
end
draw.SimpleText("Kalan Süre: "..timeleft.m..":"..extranum..timeleft.s, "arcade_font30", 5, 17, Color(255,255,255))
end
end
Schema:AllowMessage(frame)
local close = vgui.Create("DButton", frame)
close:SetPos(frame:GetWide()-50, 20)
close:SetSize(50,25)
close:SetText("Kapat")
close.DoClick = function()
frame:Close()
timer.Remove("PacMan_CloseTime")
end
close.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(200,0,0))
end
if !ix.config.Get("arcadeDisableTokenSystem") then
local moretime = vgui.Create("DButton", frame)
moretime:SetPos(frame:GetWide()-200, 20)
moretime:SetSize(150,25)
moretime:SetText("Yeni jeton ekle?")
moretime.DoClick = function()
net.Start("arcade_moretime_credit")
net.SendToServer()
end
moretime.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(0,155,155))
end
end
local webshell = vgui.Create("DPanel", frame)
webshell:SetSize(frame:GetWide(), frame:GetTall()-60)
webshell:SetPos(0,60)
local web = vgui.Create("HTML", webshell)
web:Dock( FILL )
web:OpenURL(ix.config.Get("arcadePacManWebsite"))
end)

View File

@@ -0,0 +1,122 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
net.Receive("arcade_request_pong", function()
local frame = vgui.Create("DFrame")
frame:SetSize(300, 125)
frame:Center()
frame:MakePopup()
frame:SetDraggable(false)
frame:SetTitle("")
frame:ShowCloseButton(false)
frame.Paint = function(self, w, h)
Derma_DrawBackgroundBlur(frame, 4)
draw.RoundedBox(0, 0, 0, w, h, Color(0,0,0,100))
draw.RoundedBox(0, 0, 0, w, 15, Color(25,25,25,255))
draw.SimpleText(ix.config.Get("arcadePrice").." Krediye PONG oyna?", "arcade_font30", w/2, h/4, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local accept = vgui.Create("DButton", frame)
accept:SetPos(5, 50)
accept:SetSize(140,70)
accept:SetText("")
accept.DoClick = function()
frame:Close()
net.Start("arcade_accept_pong")
net.SendToServer()
end
accept.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(0,100,0))
draw.SimpleText("Kredi Ekle", "arcade_font30", w/2, h/2, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local deny = vgui.Create("DButton", frame)
deny:SetPos(155, 50)
deny:SetSize(140,70)
deny:SetText("")
deny.DoClick = function()
frame:Close()
end
deny.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(100,0,0))
draw.SimpleText("Vazgeç", "arcade_font30", w/2, h/2, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
end)
net.Receive("arcade_open_pong", function()
local frame = vgui.Create("DFrame")
frame:SetSize(ScrH()*0.95, ScrH()*0.7+25)
frame:Center()
frame:MakePopup()
frame:SetDraggable(false)
frame:SetTitle("")
frame:ShowCloseButton(false)
if !ix.config.Get("arcadeDisableTokenSystem") then
timer.Create("PONG_CloseTime", (ix.config.Get("arcadeTime")*ix.config.Get("arcadePrice")), 1, function() frame:Close() end)
end
frame.Paint = function(self, w, h)
Derma_DrawBackgroundBlur(frame, 4)
draw.RoundedBox(0, 0, 0, w, 50, Color(0,0,0,100))
draw.RoundedBox(0, 0, 0, w, 15, Color(25,25,25,255))
-- draw.RoundedBox(0, 0, 0, w, 65, Color(200,200,200))
if !ix.config.Get("arcadeDisableTokenSystem") then
local timeleft = string.FormattedTime(timer.TimeLeft("PONG_CloseTime"))
local extranum
if timeleft.s < 10 then
extranum = 0
else
extranum = ""
end
draw.SimpleText("Kalan Süre: "..timeleft.m..":"..extranum..timeleft.s, "arcade_font30", 5, 17, Color(255,255,255))
end
end
Schema:AllowMessage(frame)
local close = vgui.Create("DButton", frame)
close:SetPos(frame:GetWide()-50, 20)
close:SetSize(50,25)
close:SetText("Kapat")
close.DoClick = function()
frame:Close()
timer.Remove("PONG_CloseTime")
end
close.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(200,0,0))
end
if !ix.config.Get("arcadeDisableTokenSystem") then
local moretime = vgui.Create("DButton", frame)
moretime:SetPos(frame:GetWide()-200, 20)
moretime:SetSize(150,25)
moretime:SetText("Yeni jeton ekle?")
moretime.DoClick = function()
net.Start("arcade_moretime_credit")
net.SendToServer()
end
moretime.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(0,155,155))
end
end
local webshell = vgui.Create("DPanel", frame)
webshell:SetSize(frame:GetWide(), frame:GetTall()-60)
webshell:SetPos(0,60)
local web = vgui.Create("HTML", webshell)
web:Dock( FILL )
web:OpenURL(ix.config.Get("arcadePongWebsite"))
end)

View File

@@ -0,0 +1,122 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
net.Receive("arcade_request_space", function()
local frame = vgui.Create("DFrame")
frame:SetSize(300, 125)
frame:Center()
frame:MakePopup()
frame:SetDraggable(false)
frame:SetTitle("")
frame:ShowCloseButton(false)
frame.Paint = function(self, w, h)
Derma_DrawBackgroundBlur(frame, 4)
draw.RoundedBox(0, 0, 0, w, h, Color(0,0,0,100))
draw.RoundedBox(0, 0, 0, w, 15, Color(25,25,25,255))
draw.SimpleText(ix.config.Get("arcadePrice").." Krediye Space Invaders oyna?", "arcade_font25", w/2, h/4, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local accept = vgui.Create("DButton", frame)
accept:SetPos(5, 50)
accept:SetSize(140,70)
accept:SetText("")
accept.DoClick = function()
frame:Close()
net.Start("arcade_accept_space")
net.SendToServer()
end
accept.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(0,100,0))
draw.SimpleText("Kredi Ekle", "arcade_font30", w/2, h/2, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local deny = vgui.Create("DButton", frame)
deny:SetPos(155, 50)
deny:SetSize(140,70)
deny:SetText("")
deny.DoClick = function()
frame:Close()
end
deny.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(100,0,0))
draw.SimpleText("Vazgeç", "arcade_font30", w/2, h/2, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
end)
net.Receive("arcade_open_space", function()
local frame = vgui.Create("DFrame")
frame:SetSize(ScrH()*0.95, ScrH()*0.95+25)
frame:Center()
frame:MakePopup()
frame:SetDraggable(false)
frame:SetTitle("")
frame:ShowCloseButton(false)
if !ix.config.Get("arcadeDisableTokenSystem") then
timer.Create("Space_CloseTime", (ix.config.Get("arcadeTime")*ix.config.Get("arcadePrice")), 1, function() frame:Close() end)
end
frame.Paint = function(self, w, h)
Derma_DrawBackgroundBlur(frame, 4)
draw.RoundedBox(0, 0, 0, w, 50, Color(0,0,0,100))
draw.RoundedBox(0, 0, 0, w, 15, Color(25,25,25,255))
-- draw.RoundedBox(0, 0, 0, w, 65, Color(200,200,200))
if !ix.config.Get("arcadeDisableTokenSystem") then
local timeleft = string.FormattedTime(timer.TimeLeft("Space_CloseTime"))
local extranum
if timeleft.s < 10 then
extranum = 0
else
extranum = ""
end
draw.SimpleText("Kalan Süre: "..timeleft.m..":"..extranum..timeleft.s, "arcade_font30", 5, 17, Color(255,255,255))
end
end
Schema:AllowMessage(frame)
local close = vgui.Create("DButton", frame)
close:SetPos(frame:GetWide()-50, 20)
close:SetSize(50,25)
close:SetText("Kapat")
close.DoClick = function()
frame:Close()
timer.Remove("Space_CloseTime")
end
close.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(200,0,0))
end
if !ix.config.Get("arcadeDisableTokenSystem") then
local moretime = vgui.Create("DButton", frame)
moretime:SetPos(frame:GetWide()-200, 20)
moretime:SetSize(150,25)
moretime:SetText("Yeni jeton ekle?")
moretime.DoClick = function()
net.Start("arcade_moretime_credit")
net.SendToServer()
end
moretime.Paint = function(self, w, h)
draw.RoundedBox(0,0,0,w,h,Color(0,155,155))
end
end
local webshell = vgui.Create("DPanel", frame)
webshell:SetSize(frame:GetWide(), frame:GetTall()-60)
webshell:SetPos(0,60)
local web = vgui.Create("HTML", webshell)
web:Dock( FILL )
web:OpenURL(ix.config.Get("arcadeSpaceWebsite"))
end)

View File

@@ -0,0 +1,102 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include("shared.lua")
local DrawCircle
DrawCircle = function( x, y, radius, seg )
local cir = {}
table.insert( cir, { x = x, y = y, u = 0.5, v = 0.5 } )
for i = 0, seg do
local a = math.rad( ( i / seg ) * -360 )
table.insert( cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 } )
end
local a = math.rad( 0 ) -- This is needed for non absolute segment counts
table.insert( cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 } )
surface.DrawPoly( cir )
end
local mat = {}
mat[0] = Material("displays/pacman_open.png")
mat[1] = Material("displays/pacman_closed.png")
function ENT:Draw()
self:DrawModel()
if LocalPlayer():GetPos():Distance( self:GetPos() ) > 500 then return end
-- Basic setups
local Pos = self:GetPos()
local Ang = self:GetAngles()
Ang:RotateAroundAxis(Ang:Up(), -90)
Ang:RotateAroundAxis(Ang:Forward(), 76)
cam.Start3D2D(Pos + Ang:Up()*10, Ang, 0.05)
-- draw.RoundedBox(0, -120, -250, 170, 110, Color(70, 70, 70))
draw.SimpleText("PACMAN", "arcade_font120", -0, -450, HSVToColor(CurTime()*6*5%360,1,1), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
if ((CurTime()*4)%4) > 2 then
draw.SimpleText("Insert "..ix.config.Get("arcadePrice").." Credit", "arcade_font60", -0, -360, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText("to play!", "arcade_font60", -0, -320, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
surface.SetDrawColor( 255, 255, 255, 255 )
draw.NoTexture()
if ((CurTime()*80)%494) < 160 then
DrawCircle(100, -220, 10, 20)
end
if ((CurTime()*80)%494) < 260 then
DrawCircle(0, -220, 10, 20)
end
if ((CurTime()*80)%494) < 360 then
DrawCircle(-100, -220, 10, 20)
end
surface.SetDrawColor( Color(255,255,255) )
surface.SetMaterial( mat[math.Round(CurTime()*4)%2] )
surface.DrawTexturedRectUV( 216-((CurTime()*80)%494), -250, 64, 64, 0, 0, 1, 1 )
-- Off screen Right = 216
-- Off screen Left = -278
-- Speed = 216-((CurTime()*30)%494)
--print(CurTime()%1)
--print(216-(CurTime()%494))
cam.End3D2D()
Ang:RotateAroundAxis(Ang:Forward(), 14)
local tr = LocalPlayer():GetEyeTrace().HitPos
local pos = self:WorldToLocal(tr)
local HeighlightColor = HSVToColor(CurTime()*6*5%360,1,1)
cam.Start3D2D(Pos + Ang:Up()*22.4, Ang, 0.05)
if pos.x < -22.174904 and pos.x > -23.252708 and pos.y < 9.953964 and pos.y > 8.003653 and pos.z < -2.079835 and pos.z > -6.987538 then
draw.RoundedBox(0, -200, 40, 40, 100, HeighlightColor)
else
draw.RoundedBox(0, -200, 40, 40, 100, Color(0, 0, 0, 240))
end
draw.RoundedBox(0, -195, 45, 30, 90, Color(40, 40, 40, 255))
draw.SimpleText("|", "arcade_font60", -180, 85, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
cam.End3D2D()
end
/*
-22.174904 9.953964 -2.079835
-22.252708 8.003653 -6.987538
*/

View File

@@ -0,0 +1,53 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/freeman/arcade_pacman.mdl")
self:SetUseType(SIMPLE_USE)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
phys:Wake()
end
function ENT:Use(ply)
local tr = ply:GetEyeTrace().HitPos
local pos = self:WorldToLocal(tr)
if pos.x < -22.174904 and pos.x > -23.252708 and pos.y < 9.953964 and pos.y > 8.003653 and pos.z < -2.079835 and pos.z > -6.987538 then
if ix.config.Get("arcadeDisableTokenSystem") then
net.Start("arcade_open_pacman")
net.Send(ply)
else
net.Start("arcade_request_pacman")
net.Send(ply)
end
end
net.Receive("arcade_accept_pacman", function(_, client)
PLUGIN:PayArcade(client, function()
timer.Simple(1.5, function()
net.Start("arcade_open_pacman")
net.Send(client)
end)
end)
end)
end
function ENT:Think()
end

View File

@@ -0,0 +1,17 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Pacman"
ENT.Author = "Owain Owjo"
ENT.Category = "Arcade Machines"
ENT.Spawnable = true
ENT.AdminSpawnable = true

View File

@@ -0,0 +1,77 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include("shared.lua")
local DrawCircle
DrawCircle = function( x, y, radius, seg )
local cir = {}
table.insert( cir, { x = x, y = y, u = 0.5, v = 0.5 } )
for i = 0, seg do
local a = math.rad( ( i / seg ) * -360 )
table.insert( cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 } )
end
local a = math.rad( 0 ) -- This is needed for non absolute segment counts
table.insert( cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 } )
surface.DrawPoly( cir )
end
function ENT:Draw()
self:DrawModel()
if LocalPlayer():GetPos():Distance( self:GetPos() ) > 500 then return end
-- Basic setups
local Pos = self:GetPos()
local Ang = self:GetAngles()
Ang:RotateAroundAxis(Ang:Up(), -90)
Ang:RotateAroundAxis(Ang:Forward(), 76)
cam.Start3D2D(Pos + Ang:Up()*10, Ang, 0.05)
-- draw.RoundedBox(0, -120, -250, 170, 110, Color(70, 70, 70))
draw.SimpleText("PONG", "arcade_font80", -0, -450, HSVToColor(CurTime()*6*5%360,1,1), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
if ((CurTime()*4)%4) > 2 then
draw.SimpleText("Insert "..ix.config.Get("arcadePrice").." Credit", "arcade_font60", -0, -360, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText("to play!", "arcade_font60", -0, -320, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
surface.SetDrawColor( 255, 255, 255, 255 )
draw.NoTexture()
if ((CurTime()*40)%494) > 247 then
DrawCircle(216-(CurTime()*80)%494, -220, 10, 20)
else
DrawCircle(-216+(CurTime()*80)%494, -220, 10, 20)
end
draw.RoundedBox(0, -215, -260, 10, 70, Color(255,255,255))
draw.RoundedBox(0, 205, -260, 10, 70, Color(255,255,255))
cam.End3D2D()
Ang:RotateAroundAxis(Ang:Forward(), 14)
local tr = LocalPlayer():GetEyeTrace().HitPos
local pos = self:WorldToLocal(tr)
local HeighlightColor = HSVToColor(CurTime()*6*5%360,1,1)
cam.Start3D2D(Pos + Ang:Up()*22.4, Ang, 0.05)
if pos.x < -22.174904 and pos.x > -23.252708 and pos.y < 9.953964 and pos.y > 8.003653 and pos.z < -2.079835 and pos.z > -6.987538 then
draw.RoundedBox(0, -200, 40, 40, 100, HeighlightColor)
else
draw.RoundedBox(0, -200, 40, 40, 100, Color(0, 0, 0, 240))
end
draw.RoundedBox(0, -195, 45, 30, 90, Color(40, 40, 40, 255))
draw.SimpleText("|", "arcade_font60", -180, 85, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
cam.End3D2D()
end

View File

@@ -0,0 +1,53 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/freeman/arcade_pong.mdl")
self:SetUseType(SIMPLE_USE)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
phys:Wake()
end
function ENT:Use(ply)
local tr = ply:GetEyeTrace().HitPos
local pos = self:WorldToLocal(tr)
if pos.x < -22.174904 and pos.x > -23.252708 and pos.y < 9.953964 and pos.y > 8.003653 and pos.z < -2.079835 and pos.z > -6.987538 then
if ix.config.Get("arcadeDisableTokenSystem") then
net.Start("arcade_open_pong")
net.Send(ply)
else
net.Start("arcade_request_pong")
net.Send(ply)
end
end
net.Receive("arcade_accept_pong", function(_, client)
PLUGIN:PayArcade(client, function()
timer.Simple(1.5, function()
net.Start("arcade_open_pong")
net.Send(client)
end)
end)
end)
end
function ENT:Think()
end

View File

@@ -0,0 +1,17 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Pong"
ENT.Author = "Owain Owjo"
ENT.Category = "Arcade Machines"
ENT.Spawnable = true
ENT.AdminSpawnable = true

View File

@@ -0,0 +1,75 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
include("shared.lua")
local DrawShip
DrawShip = function()
draw.RoundedBox(0, 216-((CurTime()*80)%494)+0, -200, 60, 20, Color(55,255,55))
draw.RoundedBox(0, 216-((CurTime()*80)%494)+5, -205, 50, 5, Color(55,255,55))
draw.RoundedBox(0, 216-((CurTime()*80)%494)+20, -215, 20, 10, Color(55,255,55))
end
function ENT:Draw()
self:DrawModel()
if LocalPlayer():GetPos():Distance( self:GetPos() ) > 500 then return end
-- Basic setups
local Pos = self:GetPos()
local Ang = self:GetAngles()
Ang:RotateAroundAxis(Ang:Up(), -90)
Ang:RotateAroundAxis(Ang:Forward(), 76)
cam.Start3D2D(Pos + Ang:Up()*10, Ang, 0.05)
-- draw.RoundedBox(0, -120, -250, 170, 110, Color(70, 70, 70))
draw.SimpleText("Space Invaders", "arcade_font80", -0, -450, HSVToColor(CurTime()*6*5%360,1,1), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
if ((CurTime()*4)%4) > 2 then
draw.SimpleText("Insert "..ix.config.Get("arcadePrice").." Credit", "arcade_font60", -0, -360, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText("to play!", "arcade_font60", -0, -320, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
if ((CurTime()*80)%494) > 140 and ((CurTime()*80)%494) < 300 then
draw.RoundedBox(0, 100, -210-((CurTime()*80)%494)/10, 10, 10, Color(55,255,55))
end
if ((CurTime()*80)%494) > 240 and ((CurTime()*80)%494) < 420 then
draw.RoundedBox(0, 0, -200-((CurTime()*80)%494)/10, 10, 10, Color(55,255,55))
end
if ((CurTime()*80)%494) > 340 and ((CurTime()*80)%494) < 580 then
draw.RoundedBox(0, -100, -190-((CurTime()*80)%494)/10, 10, 10, Color(55,255,55))
end
DrawShip()
-- Movement = 216-((CurTime()*60)%494)
-- Off screen Right = 216
-- Off screen Left = -278
cam.End3D2D()
Ang:RotateAroundAxis(Ang:Forward(), 14)
local tr = LocalPlayer():GetEyeTrace().HitPos
local pos = self:WorldToLocal(tr)
local HeighlightColor = HSVToColor(CurTime()*6*5%360,1,1)
cam.Start3D2D(Pos + Ang:Up()*22.4, Ang, 0.05)
if pos.x < -22.174904 and pos.x > -23.252708 and pos.y < 9.953964 and pos.y > 8.003653 and pos.z < -2.079835 and pos.z > -6.987538 then
draw.RoundedBox(0, -200, 40, 40, 100, HeighlightColor)
else
draw.RoundedBox(0, -200, 40, 40, 100, Color(0, 0, 0, 240))
end
draw.RoundedBox(0, -195, 45, 30, 90, Color(40, 40, 40, 255))
draw.SimpleText("|", "arcade_font60", -180, 85, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
cam.End3D2D()
end

View File

@@ -0,0 +1,53 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/freeman/arcade_invaders.mdl")
self:SetUseType(SIMPLE_USE)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
phys:Wake()
end
function ENT:Use(ply)
local tr = ply:GetEyeTrace().HitPos
local pos = self:WorldToLocal(tr)
if pos.x < -22.174904 and pos.x > -23.252708 and pos.y < 9.953964 and pos.y > 8.003653 and pos.z < -2.079835 and pos.z > -6.987538 then
if ix.config.Get("arcadeDisableTokenSystem") then
net.Start("arcade_open_space")
net.Send(ply)
else
net.Start("arcade_request_space")
net.Send(ply)
end
end
net.Receive("arcade_accept_space", function(_, client)
PLUGIN:PayArcade(client, function()
timer.Simple(1.5, function()
net.Start("arcade_open_space")
net.Send(client)
end)
end)
end)
end
function ENT:Think()
end

View File

@@ -0,0 +1,17 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Space Invaders"
ENT.Author = "Owain Owjo"
ENT.Category = "Arcade Machines"
ENT.Spawnable = true
ENT.AdminSpawnable = true

View File

@@ -0,0 +1,44 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
PLUGIN.name = "Arcade Machines"
PLUGIN.author = "The Dream Team, AleXXX_007 (Integration to IX)"
PLUGIN.description = "Adds 3 arcade machines"
ix.config.Add("arcadeDisableTokenSystem", false, "Simply set this to true and all games are free", nil, {
category = "Arcade Machines"
})
ix.config.Add("arcadePacManWebsite", "http://0wain.xyz/pacman/", "The website source. I suggest leaving it as is if you don't really understand this", nil, {
category = "Arcade Machines"
})
ix.config.Add("arcadePongWebsite", "http://kanocomputing.github.io/Pong.js/examples/player-vs-bot.html", "The website source. I suggest leaving it as is if you don't really understand this", nil, {
category = "Arcade Machines"
})
ix.config.Add("arcadeSpaceWebsite", "http://funhtml5games.com/spaceinvaders/index.html", "The website source. I suggest leaving it as is if you don't really understand this", nil, {
category = "Arcade Machines"
})
ix.config.Add("arcadePrice", 1, "The price to play arcade game", nil, {
data = {min = 1, max = 1000},
category = "Arcade Machines"
})
ix.config.Add("arcadeTime", 300, "How long it is possible to play for 1 payment (SECONDS)", nil, {
data = {min = 60, max = 3600},
category = "Arcade Machines"
})
ix.util.Include("cl_plugin.lua")
ix.util.Include("sv_plugin.lua")

View File

@@ -0,0 +1,75 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
util.AddNetworkString("arcade_msg")
util.AddNetworkString("arcade_moretime_credit")
util.AddNetworkString("arcade_adjust_timer")
util.AddNetworkString("arcade_request_pacman")
util.AddNetworkString("arcade_accept_pacman")
util.AddNetworkString("arcade_open_pacman")
util.AddNetworkString("arcade_request_space")
util.AddNetworkString("arcade_accept_space")
util.AddNetworkString("arcade_open_space")
util.AddNetworkString("arcade_request_pong")
util.AddNetworkString("arcade_accept_pong")
util.AddNetworkString("arcade_open_pong")
net.Receive("arcade_moretime_credit", function(_, client)
PLUGIN:PayArcade(client, function()
net.Start("arcade_adjust_timer")
net.Send(client)
end)
end)
function PLUGIN:PayArcade(client, callback)
local price = ix.config.Get("arcadePrice")
client:SelectCIDCard(function(cardItem)
if (cardItem) then
if (cardItem:GetData("active")) then
if (cardItem:HasCredits(price)) then
cardItem:TakeCredits(price, "Arcade machine", "Arcade Game cost")
ix.city.main:AddCredits(price)
client:Notify("Arcade makinesine " .. price .. " kredi ödediniz.")
callback()
client:EmitSound("buttons/lever8.wav", 65)
else
client:Notify("Arcade makineleri alaycı bir hata sesi yayar. \"Yetersiz bakiye.\"")
end
else
ix.combineNotify:AddImportantNotification("WRN:// Inactive Identification Card #" .. cardItem:GetData("cid", 00000) .. " usage attempt detected", nil, client, client:GetPos())
client:Notify("Arcade makinesi alaycı bir hata sesi yayar. \"CID kart verileri okunamıyor.\"")
end
cardItem:LoadOwnerGenericData(function(idCard, genericData)
local isBOL = genericData.bol
local isAC = genericData.anticitizen
if (isBOL or isAC) then
local text = isBOL and "BOL Suspect" or "Anti-Citizen"
ix.combineNotify:AddImportantNotification("WRN:// " .. text .. " Identification Card activity detected", nil, client, client:GetPos())
end
end)
else
client:Notify("Arcade makinesi alaycı bir hata sesi yayar. \"CID kart verileri okunamıyor.\"")
end
end, function()
client:Notify("Arcade makinesi boşta duruyor, CID kart okuyucu ışığı yanıp sönüyor. Bir CID kartı bekliyor.")
end)
end