mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
16
gamemodes/helix/plugins/icpanels/items/sh_paintcan.lua
Normal file
16
gamemodes/helix/plugins/icpanels/items/sh_paintcan.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Pot de peinture"
|
||||
ITEM.description = "Un pot de peinture, utilisé pour...peindre."
|
||||
ITEM.model = "models/props_junk/metal_paintcan001a.mdl"
|
||||
ITEM.colorAppendix = {["red"] = "Si vous êtes de l'UTC, cet élément vous permet d'utiliser la commande /PanelAdd. Il ne faut pas en abuser."}
|
||||
ITEM.category = "Autres"
|
||||
16
gamemodes/helix/plugins/icpanels/items/sh_rolledposter.lua
Normal file
16
gamemodes/helix/plugins/icpanels/items/sh_rolledposter.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Affiche de propagande"
|
||||
ITEM.description = "Une affiche enroulée, prête à être accrochée au mur."
|
||||
ITEM.model = "models/props_junk/cardboard_box004a.mdl"
|
||||
ITEM.colorAppendix = {["red"] = "Si vous êtes de l'UTC, cet élément vous permet d'utiliser la commande /PanelAdd. Il ne faut pas en abuser."}
|
||||
ITEM.category = "Autres"
|
||||
69
gamemodes/helix/plugins/icpanels/sh_hooks.lua
Normal file
69
gamemodes/helix/plugins/icpanels/sh_hooks.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
function PLUGIN:InitializedPlugins()
|
||||
local panelPlugin = ix.plugin.Get("3dpanel")
|
||||
|
||||
if (panelPlugin) then
|
||||
ix.command.list["paneladd"].adminOnly = nil
|
||||
ix.command.list["paneladd"].OnCheckAccess = function() return true end -- eh
|
||||
ix.command.list["paneladd"].OnRun = function(self, client, url, scale, brightness)
|
||||
local character = client:GetCharacter()
|
||||
local panelItem = character:GetInventory():HasItem("paintcan") or character:GetInventory():HasItem("rolledposter")
|
||||
local group = character.GetGroup and character:GetGroup() or {}
|
||||
local groupname = group.name
|
||||
scale = scale or 1
|
||||
|
||||
if ((panelItem and (client:Team() == FACTION_WORKERS or (groupname and groupname == "Department of Business"))) or CAMI.PlayerHasAccess(client, "Helix - Manage Panels")) then
|
||||
-- Get the position and angles of the panel.
|
||||
local trace = client:GetEyeTrace()
|
||||
local position = trace.HitPos
|
||||
local angles = trace.HitNormal:Angle()
|
||||
angles:RotateAroundAxis(angles:Up(), 90)
|
||||
angles:RotateAroundAxis(angles:Forward(), 90)
|
||||
|
||||
if (panelItem) then
|
||||
panelItem:Remove()
|
||||
|
||||
if (panelItem.uniqueID == "paintcan") then
|
||||
character:GetInventory():Add("junk_paintcan")
|
||||
end
|
||||
end
|
||||
|
||||
-- Add the panel.
|
||||
panelPlugin:AddPanel(position + angles:Up() * 1, angles, url, math.min(scale, 5), brightness)
|
||||
return "@panelAdded"
|
||||
else
|
||||
return "Vous devez être CWU/DOB et avoir un pot de peinture ou une affiche roulée pour ajouter un panneau !"
|
||||
end
|
||||
end
|
||||
|
||||
ix.command.list["panelremove"].adminOnly = nil
|
||||
ix.command.list["panelremove"].OnCheckAccess = function() return true end -- eh
|
||||
ix.command.list["panelremove"].OnRun = function(self, client, radius)
|
||||
local character = client:GetCharacter()
|
||||
local group = character.GetGroup and character:GetGroup() or {}
|
||||
local groupname = group.name
|
||||
|
||||
if (client:IsAdmin() or client:IsCombine() or client:Team() == FACTION_WORKERS or (groupname and groupname == "Department of Business")) then
|
||||
-- Get the origin to remove panel.
|
||||
local trace = client:GetEyeTrace()
|
||||
local position = trace.HitPos
|
||||
-- Remove the panel(s) and get the amount removed.
|
||||
local amount = panelPlugin:RemovePanel(position, math.min(radius or 100, 500))
|
||||
|
||||
return "@panelRemoved", amount
|
||||
else
|
||||
return "@notAllowed"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
16
gamemodes/helix/plugins/icpanels/sh_plugin.lua
Normal file
16
gamemodes/helix/plugins/icpanels/sh_plugin.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
PLUGIN.name = "IC Panels"
|
||||
PLUGIN.author = "Aspect™"
|
||||
PLUGIN.description = "Permet aux joueurs d'utiliser les commandes du panneau 3D s'ils ont un pot de peinture ou une affiche roulée."
|
||||
|
||||
ix.util.Include("sh_hooks.lua")
|
||||
Reference in New Issue
Block a user