mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
68
gamemodes/darkrp/plugins/writing/items/base/sh_plotters.lua
Normal file
68
gamemodes/darkrp/plugins/writing/items/base/sh_plotters.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
--[[
|
||||
| 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
|
||||
|
||||
ITEM.name = "Newspaper Printer Base"
|
||||
ITEM.model = "models/willardnetworks/plotter.mdl"
|
||||
ITEM.width = 2
|
||||
ITEM.height = 2
|
||||
ITEM.skin = 1
|
||||
ITEM.description = ""
|
||||
ITEM.category = "Writing"
|
||||
ITEM.ent = ""
|
||||
|
||||
ITEM.functions.Place = {
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local entity = ents.Create(itemTable.ent)
|
||||
local trace = client:GetEyeTraceNoCursor()
|
||||
|
||||
if (trace.HitPos:Distance( client:GetShootPos() ) <= 192) and !client.CantPlace then
|
||||
entity:SetPos(trace.HitPos)
|
||||
entity:Spawn()
|
||||
entity:SetNWInt("owner", client:GetCharacter():GetID())
|
||||
|
||||
client.CantPlace = true
|
||||
|
||||
if itemTable:GetData("paper") then
|
||||
entity.paper = itemTable:GetData("paper")
|
||||
entity:SetPaper(entity.paper)
|
||||
end
|
||||
|
||||
if itemTable:GetData("ink") then
|
||||
entity.ink = itemTable:GetData("ink")
|
||||
entity:SetInk(entity.ink)
|
||||
end
|
||||
|
||||
if itemTable:GetData("registeredCID") then
|
||||
entity.registeredCID = itemTable:GetData("registeredCID")
|
||||
end
|
||||
|
||||
if (IsValid(entity)) then
|
||||
entity:SetAngles(Angle(0, client:EyeAngles().yaw + 180, 0))
|
||||
end
|
||||
|
||||
ix.saveEnts:SaveEntity(entity)
|
||||
|
||||
timer.Simple(3, function()
|
||||
if client then
|
||||
client.CantPlace = false
|
||||
end
|
||||
end)
|
||||
elseif client.CantPlace then
|
||||
client:NotifyLocalized("You cannot place this right now!")
|
||||
return false
|
||||
else
|
||||
client:NotifyLocalized("You cannot place it that far away!..")
|
||||
return false
|
||||
end
|
||||
end
|
||||
}
|
||||
57
gamemodes/darkrp/plugins/writing/items/base/sh_writing.lua
Normal file
57
gamemodes/darkrp/plugins/writing/items/base/sh_writing.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
--[[
|
||||
| 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
|
||||
|
||||
ITEM.name = "Writing Base"
|
||||
ITEM.model = "models/error.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.identifier = "base"
|
||||
ITEM.description = ""
|
||||
ITEM.category = "Writing"
|
||||
ITEM.bAllowMultiCharacterInteraction = true
|
||||
|
||||
function ITEM:GetName()
|
||||
local title = self:GetData("title")
|
||||
if title and title != "" then return title end
|
||||
|
||||
return self.name
|
||||
end
|
||||
|
||||
function ITEM:GetDescription()
|
||||
return "Okunabilir veya üzerine yazılabilir bir "..self.identifier
|
||||
end
|
||||
|
||||
function ITEM:SetBodygroups(bodygroups)
|
||||
self:SetData("bodygroups", bodygroups)
|
||||
end
|
||||
|
||||
function ITEM:GetModelBodygroups()
|
||||
return self:GetData("bodygroups") or ""
|
||||
end
|
||||
|
||||
ITEM.functions.Write = {
|
||||
name = "Oku/Yaz",
|
||||
tip = "Oku ya da yaz.",
|
||||
icon = "icon16/text_align_center.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
if !IsValid(client) then return false end
|
||||
|
||||
if (SERVER) then
|
||||
PLUGIN:OpenWriting(client, item)
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
--[[
|
||||
| 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 = "Garip Yazıcı"
|
||||
ITEM.uniqueID = "newspaper_printer_cracked"
|
||||
ITEM.description = "Garip gazeteler yazdırabilen bir gazete yazıcısı."
|
||||
ITEM.ent = "ix_crackedprinter"
|
||||
@@ -0,0 +1,15 @@
|
||||
--[[
|
||||
| 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 = "Gazete Yazıcısı"
|
||||
ITEM.uniqueID = "newspaper_printer"
|
||||
ITEM.description = "Gazete yazdırabilen bir gazete yazıcısı."
|
||||
ITEM.ent = "ix_newspaperprinter"
|
||||
19
gamemodes/darkrp/plugins/writing/items/sh_blackink.lua
Normal file
19
gamemodes/darkrp/plugins/writing/items/sh_blackink.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
--[[
|
||||
| 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
|
||||
|
||||
ITEM.name = "Siyah Mürekkep"
|
||||
ITEM.uniqueID = "black_ink"
|
||||
ITEM.model = "models/gibs/metal_gib2.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.description = "Siyah mürekkep kartuşu."
|
||||
ITEM.category = "Writing"
|
||||
80
gamemodes/darkrp/plugins/writing/items/sh_pin.lua
Normal file
80
gamemodes/darkrp/plugins/writing/items/sh_pin.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
--[[
|
||||
| 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
|
||||
|
||||
ITEM.name = "İğne"
|
||||
ITEM.uniqueID = "pin"
|
||||
ITEM.model = "models/items/crossbowrounds.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.description = "Duvarlara kağıt asmak için kullanılan bir iğne."
|
||||
ITEM.category = "Writing"
|
||||
|
||||
function ITEM:MakeNail(nailedEnt, pos, ang, client)
|
||||
pos = nailedEnt:LocalToWorld( pos )
|
||||
nailedEnt:GetPhysicsObject():EnableMotion(false)
|
||||
|
||||
local nail = ents.Create( "gmod_nail" )
|
||||
nail:SetPos( pos )
|
||||
nail:SetAngles( ang )
|
||||
nail:SetParent( nailedEnt )
|
||||
|
||||
nail:Spawn()
|
||||
nail:Activate()
|
||||
|
||||
local item = ix.item.instances[nailedEnt.ixItemID]
|
||||
item:SetData("pin", true)
|
||||
item:SetData("owner", client:GetCharacter():GetID())
|
||||
nail.itemparentID = nailedEnt.ixItemID
|
||||
nail.itemparentPos = nailedEnt:GetPos()
|
||||
nail.itemparentAngs = nailedEnt:GetAngles()
|
||||
|
||||
ix.saveEnts:SaveEntity(nail)
|
||||
end
|
||||
|
||||
ITEM.functions.Pin = {
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
|
||||
local trace = client:GetEyeTrace()
|
||||
|
||||
-- Bail if we hit world or a client
|
||||
if ( !trace.Entity:IsValid() or trace.Entity:IsPlayer() ) then return false end
|
||||
|
||||
if ( SERVER and !util.IsValidPhysicsObject( trace.Entity, trace.PhysicsBone ) ) then return false end
|
||||
|
||||
local tr = {}
|
||||
tr.start = trace.HitPos
|
||||
tr.endpos = trace.HitPos + (client:GetAimVector() * 16.0)
|
||||
tr.filter = { client, trace.Entity }
|
||||
local trTwo = util.TraceLine( tr )
|
||||
|
||||
if ( trTwo.Hit and !trTwo.Entity:IsPlayer() ) then
|
||||
if trace.Entity:GetClass() != "ix_item" then
|
||||
client:NotifyLocalized("Sadece öğeler sabitlenebilir!")
|
||||
return false
|
||||
end
|
||||
|
||||
-- Client can bail now
|
||||
if ( CLIENT ) then return true end
|
||||
|
||||
local vOrigin = trace.HitPos - (client:GetAimVector() * 8.0)
|
||||
local vDirection = client:GetAimVector():Angle()
|
||||
|
||||
vOrigin = trace.Entity:WorldToLocal( vOrigin )
|
||||
item:MakeNail( trace.Entity, vOrigin, vDirection, client )
|
||||
client:EmitSound("weapons/crossbow/hit1.wav", 110)
|
||||
else
|
||||
client:NotifyLocalized("Sabitlenecek bir şey bulunamadı!")
|
||||
return false
|
||||
end
|
||||
end
|
||||
}
|
||||
25
gamemodes/darkrp/plugins/writing/items/writing/sh_book.lua
Normal file
25
gamemodes/darkrp/plugins/writing/items/writing/sh_book.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
--[[
|
||||
| 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 = "Kitap"
|
||||
ITEM.model = "models/willardnetworks/misc/book.mdl"
|
||||
ITEM.identifier = "book"
|
||||
ITEM.holdData = {
|
||||
vectorOffset = {
|
||||
right = 0.5,
|
||||
up = 0,
|
||||
forward = 1
|
||||
},
|
||||
angleOffset = {
|
||||
right = 0,
|
||||
up = 0,
|
||||
forward = -0
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
--[[
|
||||
| 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.uniqueID = "bulkbox_paper_pins"
|
||||
ITEM.name = "Kağıt ve İğne Kutusu"
|
||||
ITEM.description = "Beş kağıt ve iğneden oluşan bir set içeren bir kutu. Ne kadar uygun."
|
||||
ITEM.category = "Boxes"
|
||||
ITEM.model = "models/items/item_item_crate.mdl"
|
||||
ITEM.width = 2
|
||||
ITEM.height = 2
|
||||
|
||||
ITEM.colorAppendix = {["red"] = "Lütfen bunu açmadan önce 10 adet boş envanter yuvanız olduğundan emin olun."}
|
||||
|
||||
ITEM.functions.Convert = {
|
||||
name = "Dönüştür",
|
||||
icon = "icon16/wrench.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
local inventory = client:GetCharacter():GetInventory()
|
||||
|
||||
inventory:Add("paper", 5)
|
||||
inventory:Add("pin", 5)
|
||||
|
||||
client:Notify(item.name .. " adlı öğeyi açtınız.")
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
--[[
|
||||
| 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 = "Gazete"
|
||||
ITEM.model = "models/props_junk/garbage_newspaper001a.mdl"
|
||||
ITEM.identifier = "newspaper"
|
||||
ITEM.holdData = {
|
||||
vectorOffset = {
|
||||
right = 0.5,
|
||||
up = 0,
|
||||
forward = 1
|
||||
},
|
||||
angleOffset = {
|
||||
right = 0,
|
||||
up = 0,
|
||||
forward = -0
|
||||
},
|
||||
}
|
||||
|
||||
function ITEM:OnInstanced()
|
||||
if self.data and self.data.data then
|
||||
if self.data.data.writingID then self:SetData("writingID", self.data.data.writingID) end
|
||||
if self.data.data.title then self:SetData("title", self.data.data.title) end
|
||||
if self.data.data.cracked then self:SetData("cracked", self.data.data.cracked) end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,25 @@
|
||||
--[[
|
||||
| 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 = "Not Defteri"
|
||||
ITEM.model = "models/props_lab/clipboard.mdl"
|
||||
ITEM.identifier = "notepad"
|
||||
ITEM.holdData = {
|
||||
vectorOffset = {
|
||||
right = 0.5,
|
||||
up = 0,
|
||||
forward = 1
|
||||
},
|
||||
angleOffset = {
|
||||
right = 0,
|
||||
up = 0,
|
||||
forward = -0
|
||||
},
|
||||
}
|
||||
45
gamemodes/darkrp/plugins/writing/items/writing/sh_paper.lua
Normal file
45
gamemodes/darkrp/plugins/writing/items/writing/sh_paper.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
--[[
|
||||
| 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 = "Kağıt"
|
||||
ITEM.model = "models/props_c17/paper01.mdl"
|
||||
ITEM.identifier = "paper"
|
||||
ITEM.holdData = {
|
||||
vectorOffset = {
|
||||
right = 0.5,
|
||||
up = 0,
|
||||
forward = 1
|
||||
},
|
||||
angleOffset = {
|
||||
right = 0,
|
||||
up = 0,
|
||||
forward = -0
|
||||
},
|
||||
}
|
||||
ITEM.functions.zTear = { -- I want it to be last
|
||||
name = "Yırt",
|
||||
icon = "icon16/textfield_delete.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
|
||||
client:RequestConfirmation("Yırtmayı Onayla", "Bu kağıdı yırtmak istediğinden emin misiniz?", function(confirmation)
|
||||
if (!confirmation) then return end
|
||||
|
||||
client:Notify("Kağıdı yırttın.")
|
||||
item:Remove()
|
||||
end)
|
||||
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(item)
|
||||
return !item.entity or !IsValid(item.entity)
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user