mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
54
gamemodes/darkrp/plugins/arcademachines/cl_plugin.lua
Normal file
54
gamemodes/darkrp/plugins/arcademachines/cl_plugin.lua
Normal 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)
|
||||
123
gamemodes/darkrp/plugins/arcademachines/derma/cl_pacman.lua
Normal file
123
gamemodes/darkrp/plugins/arcademachines/derma/cl_pacman.lua
Normal 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("Jouer à PacMan pour "..ix.config.Get("arcadePrice").." crédit ?", "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("Insérer crédit", "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("Quitter", "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("Temps restant : "..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("Fermer")
|
||||
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("Insérer un autre crédit ?")
|
||||
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)
|
||||
122
gamemodes/darkrp/plugins/arcademachines/derma/cl_pong.lua
Normal file
122
gamemodes/darkrp/plugins/arcademachines/derma/cl_pong.lua
Normal 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("Jouer à Pong pour "..ix.config.Get("arcadePrice").." crédit ?", "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("Insérer crédit", "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("Quitter", "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("Temps restant : "..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("Fermer")
|
||||
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("Insérer un autre crédit ?")
|
||||
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)
|
||||
@@ -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("Jouer à Space Invaders pour "..ix.config.Get("arcadePrice").." crédit ?", "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("Insérer crédit", "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("Quitter", "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("Temps restant : "..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("Fermer")
|
||||
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("Insérer un autre crédit ?")
|
||||
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)
|
||||
@@ -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("Insérez "..ix.config.Get("arcadePrice").." crédit", "arcade_font60", -0, -360, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
draw.SimpleText("pour jouer !", "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
|
||||
|
||||
*/
|
||||
@@ -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
|
||||
@@ -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 = "Machines d'Arcade"
|
||||
ENT.Spawnable = true
|
||||
ENT.AdminSpawnable = true
|
||||
@@ -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("Insérez "..ix.config.Get("arcadePrice").." crédit", "arcade_font60", -0, -360, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
draw.SimpleText("pour jouer !", "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
|
||||
@@ -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
|
||||
@@ -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 = "Machine d'Arcade"
|
||||
ENT.Spawnable = true
|
||||
ENT.AdminSpawnable = true
|
||||
@@ -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("Insérez "..ix.config.Get("arcadePrice").." crédit", "arcade_font60", -0, -360, Color(55,210,55), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
draw.SimpleText("pour jouer !", "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
|
||||
@@ -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
|
||||
@@ -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 = "Machine d'Arcade"
|
||||
ENT.Spawnable = true
|
||||
ENT.AdminSpawnable = true
|
||||
44
gamemodes/darkrp/plugins/arcademachines/sh_plugin.lua
Normal file
44
gamemodes/darkrp/plugins/arcademachines/sh_plugin.lua
Normal 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 = "Machines d'Arcade"
|
||||
})
|
||||
|
||||
ix.config.Add("arcadePacManWebsite", "http://0wain.xyz/pacman/", "La source du site web. Je suggère de la laisser telle quelle si vous ne la comprenez pas vraiment.", nil, {
|
||||
category = "Machines d'Arcade"
|
||||
})
|
||||
|
||||
ix.config.Add("arcadePongWebsite", "http://kanocomputing.github.io/Pong.js/examples/player-vs-bot.html", "La source du site web. Je suggère de la laisser telle quelle si vous ne la comprenez pas vraiment.", nil, {
|
||||
category = "Machines d'Arcade"
|
||||
})
|
||||
|
||||
ix.config.Add("arcadeSpaceWebsite", "http://funhtml5games.com/spaceinvaders/index.html", "La source du site web. Je suggère de la laisser telle quelle si vous ne la comprenez pas vraiment.", nil, {
|
||||
category = "Machines d'Arcade"
|
||||
})
|
||||
|
||||
ix.config.Add("arcadePrice", 1, "Le prix pour jouer au jeu d'arcade", nil, {
|
||||
data = {min = 1, max = 1000},
|
||||
category = "Machines d'Arcade"
|
||||
})
|
||||
|
||||
ix.config.Add("arcadeTime", 300, "Combien de temps il est possible de jouer pour 1 paiement (SECONDES)", nil, {
|
||||
data = {min = 60, max = 3600},
|
||||
category = "Machines d'Arcade"
|
||||
})
|
||||
|
||||
ix.util.Include("cl_plugin.lua")
|
||||
ix.util.Include("sv_plugin.lua")
|
||||
75
gamemodes/darkrp/plugins/arcademachines/sv_plugin.lua
Normal file
75
gamemodes/darkrp/plugins/arcademachines/sv_plugin.lua
Normal 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("Vous avez inséré " .. price .. " crédit dans la machine d'arcade.")
|
||||
|
||||
callback()
|
||||
|
||||
client:EmitSound("buttons/lever8.wav", 65)
|
||||
else
|
||||
client:Notify("Vous n'avez pas assez de crédit...")
|
||||
end
|
||||
else
|
||||
ix.combineNotify:AddImportantNotification("ALERTE:// La carte C.I.D non-autorisée #" .. cardItem:GetData("cid", 00000) .. " a tentée d'être utilisée.", nil, client, client:GetPos())
|
||||
client:Notify("La machine d'arcade n'est pas pu lire votre carte CID.")
|
||||
end
|
||||
|
||||
cardItem:LoadOwnerGenericData(function(idCard, genericData)
|
||||
local isBOL = genericData.bol
|
||||
local isAC = genericData.anticitizen
|
||||
if (isBOL or isAC) then
|
||||
local text = isBOL and "Recherché" or "Anti-Citoyen"
|
||||
|
||||
ix.combineNotify:AddImportantNotification("ALERTE:// " .. text .. " Carte CID d'un Citoyen suspect utilisée.", nil, client, client:GetPos())
|
||||
end
|
||||
end)
|
||||
else
|
||||
client:Notify("La machine d'arcade n'est pas pu lire votre carte CID.")
|
||||
end
|
||||
end, function()
|
||||
client:Notify("Le lecteur de carte CID clignote en blanc. Elle attend pour une carte CID.")
|
||||
end)
|
||||
end
|
||||
Reference in New Issue
Block a user