mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-18 22:23:46 +03:00
Upload
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
--[[
|
||||
| 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 = "Coupon de ration"
|
||||
ITEM.model = Model("models/willardnetworks/misc/idcard.mdl")
|
||||
ITEM.description = "Un coupon de rationnement à utiliser en échange de crédits."
|
||||
ITEM.amount = 5
|
||||
ITEM.category = "Ration Coupons"
|
||||
ITEM.maxStackSize = 5
|
||||
|
||||
ITEM.base = "base_stackable"
|
||||
ITEM.bInstanceMaxstack = false
|
||||
|
||||
ITEM.functions.Use = {
|
||||
name = "Utiliser",
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
local errorMsg = "Vous devez être près d’un distributeur de rations ou d’un terminal citoyen pour le faire !"
|
||||
local entity = client:GetEyeTraceNoCursor().Entity
|
||||
|
||||
if (IsValid(entity)) then
|
||||
if (entity:GetClass() != "ix_rationdispenser" and entity:GetClass() != "ix_terminal") then
|
||||
client:NotifyLocalized(errorMsg)
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
if (client:GetShootPos():Distance(entity:GetPos()) > 50) then
|
||||
client:NotifyLocalized(errorMsg)
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
if ((!entity.canUse or (entity.nextUseTime and entity.nextUseTime > CurTime())) or (entity:GetClass() == "ix_rationdispenser" and !entity:GetEnabled())) then
|
||||
client:NotifyLocalized("Ce terminal est hors ligne ou est entrain d'être utilisé.")
|
||||
|
||||
return false
|
||||
else
|
||||
client.ixCouponUsed = itemTable.id
|
||||
|
||||
-- Check for citizen id(s)
|
||||
local idCards = character:GetInventory():GetItemsByUniqueID("id_card")
|
||||
|
||||
if (#idCards == 1) then
|
||||
idCards[1]:LoadOwnerGenericData(entity.CheckIdCardCoupon, entity.CheckIdError, client, entity, itemTable.amount)
|
||||
else
|
||||
netstream.Start(client, "CIDSelectorCoupon", entity)
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
client:NotifyLocalized(errorMsg)
|
||||
|
||||
return false
|
||||
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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Coupon - 100 Crédits"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon3.mdl")
|
||||
ITEM.amount = 100
|
||||
ITEM.category = "Combine"
|
||||
ITEM.maxStackSize = 5
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 100 crédits lorsqu'il est échangé à un distributeur de ration ou à un terminal citoyen."}
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Coupon - 10 Crédits"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon.mdl")
|
||||
ITEM.amount = 10
|
||||
ITEM.category = "Combine"
|
||||
ITEM.maxStackSize = 5
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 10 crédits lorsqu'il est échangé à un distributeur de ration ou à un terminal citoyen."}
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Coupon - 25 Crédits"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon2.mdl")
|
||||
ITEM.amount = 25
|
||||
ITEM.category = "Combine"
|
||||
ITEM.maxStackSize = 5
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 25 crédits lorsqu'il est échangé à un distributeur de ration ou à un terminal citoyen."}
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Coupon - 50 Crédits"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon3.mdl")
|
||||
ITEM.amount = 50
|
||||
ITEM.category = "Combine"
|
||||
ITEM.maxStackSize = 5
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 50 crédits lorsqu'il est échangé à un distributeur de ration ou à un terminal citoyen."}
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Coupon - 5 Crédits"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon.mdl")
|
||||
ITEM.amount = 5
|
||||
ITEM.category = "Combine"
|
||||
ITEM.maxStackSize = 5
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 5 crédits lorsqu'il est échangé à un distributeur de ration ou à un terminal citoyen."}
|
||||
@@ -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 = "Coupon de crédits - Tier 1"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon.mdl")
|
||||
ITEM.amount = 20
|
||||
ITEM.category = "Combine"
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 20 crédits lorsqu'il est échangé à un distributeur de rations ou à un terminal citoyen."}
|
||||
@@ -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 = "Coupon de crédits - Tier 2"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon2.mdl")
|
||||
ITEM.amount = 35
|
||||
ITEM.category = "Combine"
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 35 crédits lorsqu'il est utilisé dans un distributeur de rations ou un terminal citoyen."}
|
||||
@@ -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 = "Coupon de crédits - Tier 3"
|
||||
ITEM.model = Model("models/willardnetworks/props/rationcoupon3.mdl")
|
||||
ITEM.amount = 50
|
||||
ITEM.category = "Combine"
|
||||
ITEM.colorAppendix = {["blue"] = "Ce coupon génère 50 crédits lorsqu'il est utilisé dans un distributeur de rations ou un terminal citoyen."}
|
||||
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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 = "Ration - Protection civile"
|
||||
ITEM.model = Model("models/willardnetworks/rations/wn_new_ration.mdl")
|
||||
ITEM.skin = 4
|
||||
ITEM.description = "Un paquet sous film rétractable contenant de la nourriture et de l'eau. Elle est fabriquée par le Cartel."
|
||||
ITEM.items = {"metropolicesupplements", "nutrientdrink", "coupon_medium"}
|
||||
ITEM.category = "Combine"
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(25, 400.56, 0),
|
||||
fov = 1.27
|
||||
}
|
||||
ITEM.functions.Open = {
|
||||
name = "Diviser",
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
|
||||
for _, v in ipairs(itemTable.items) do
|
||||
if (!character:GetInventory():Add(v)) then
|
||||
ix.item.Spawn(v, client)
|
||||
end
|
||||
end
|
||||
|
||||
client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
--[[
|
||||
| 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 = "Ration - Amélioré"
|
||||
ITEM.model = Model("models/willardnetworks/rations/wn_new_ration.mdl")
|
||||
ITEM.skin = 6
|
||||
ITEM.description = "Un paquet sous film plastique contenant de la nourriture qui semble plus volumineuse que votre ration standard."
|
||||
ITEM.items = {"fruit_apple", "proc_paste", "drink_breen_water", "10_coupon", "10_coupon"}
|
||||
ITEM.category = "Combine"
|
||||
ITEM.functions.Open = {
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
|
||||
for _, v in ipairs(itemTable.items) do
|
||||
if (!character:GetInventory():Add(v)) then
|
||||
ix.item.Spawn(v, client)
|
||||
end
|
||||
end
|
||||
|
||||
client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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 = "Ration - Loyaliste"
|
||||
ITEM.model = Model("models/willardnetworks/food/ration_box.mdl")
|
||||
ITEM.skin = 0
|
||||
ITEM.description = "Un paquet sous film rétractable contenant de la nourriture et de l'eau. Fabriquée par l'Union."
|
||||
ITEM.items = {"fruit_watermelon_slice", "fruit_apple", "baking_bread", "drink_sparkling_water", "25_coupon"}
|
||||
ITEM.category = "Combine"
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(25, 400.56, 0),
|
||||
fov = 1.27
|
||||
}
|
||||
ITEM.functions.Open = {
|
||||
name = "Diviser",
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
|
||||
for _, v in ipairs(itemTable.items) do
|
||||
if (!character:GetInventory():Add(v)) then
|
||||
ix.item.Spawn(v, client)
|
||||
end
|
||||
end
|
||||
|
||||
client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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 = "Ration - Loyaliste prioritaire"
|
||||
ITEM.model = Model("models/willardnetworks/food/ration_box.mdl")
|
||||
ITEM.skin = 2
|
||||
ITEM.description = "Une boîte en carton qui semble assez raffinée, transportant quelques fournitures. Elle comporte des logos combinés avec de petites citations inspirantes sur ses côtés."
|
||||
ITEM.items = {"luxury_choc", "fruit_banana", "baking_bread", "drink_sparkling_water", "25_coupon" ,"5_coupon"}
|
||||
ITEM.category = "Combine"
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(25, 400.56, 0),
|
||||
fov = 1.27
|
||||
}
|
||||
ITEM.functions.Open = {
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
|
||||
for _, v in ipairs(itemTable.items) do
|
||||
if (!character:GetInventory():Add(v)) then
|
||||
ix.item.Spawn(v, client)
|
||||
end
|
||||
end
|
||||
|
||||
client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
|
||||
end
|
||||
}
|
||||
31
gamemodes/darkrp/plugins/rationdispenser/items/sh_ration.lua
Normal file
31
gamemodes/darkrp/plugins/rationdispenser/items/sh_ration.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
--[[
|
||||
| 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 = "Ration - Standard"
|
||||
ITEM.model = Model("models/willardnetworks/rations/wn_new_ration.mdl")
|
||||
ITEM.description = "Un paquet sous film rétractable contenant de la nourriture et de l'eau. Elle est fabriquée par l'Union."
|
||||
ITEM.items = {"proc_paste", "drink_breen_water", "10_coupon", "5_coupon"}
|
||||
ITEM.category = "Combine"
|
||||
ITEM.functions.Open = {
|
||||
name = "Diviser",
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
|
||||
for _, v in ipairs(itemTable.items) do
|
||||
if (!character:GetInventory():Add(v)) then
|
||||
ix.item.Spawn(v, client)
|
||||
end
|
||||
end
|
||||
|
||||
client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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 = "Ration - Véritable loyaliste"
|
||||
ITEM.model = Model("models/willardnetworks/food/ration_box.mdl")
|
||||
ITEM.skin = 1
|
||||
ITEM.description = "Une petite boîte en carton contenant de la nourriture. Elle arbore un élégant logo Combine. Pour une raison quelconque, elle semble plus luxueuse."
|
||||
ITEM.items = {"luxury_choc", "baking_bread", "comfort_fish", "drink_sparkling_water", "25_coupon", "10_coupon"}
|
||||
ITEM.category = "Combine"
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(25, 400.56, 0),
|
||||
fov = 1.27
|
||||
}
|
||||
ITEM.functions.Open = {
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
|
||||
for _, v in ipairs(itemTable.items) do
|
||||
if (!character:GetInventory():Add(v)) then
|
||||
ix.item.Spawn(v, client)
|
||||
end
|
||||
end
|
||||
|
||||
client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
--[[
|
||||
| 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 = "Ration - Indésirable"
|
||||
ITEM.model = Model("models/willardnetworks/rations/wn_new_ration.mdl")
|
||||
ITEM.description = "Un paquet plastifié déchiré et usé contenant de la nourriture... si on peut même l'appeler ainsi."
|
||||
ITEM.skin = 3
|
||||
ITEM.items = {"proc_paste", "drink_breen_water"}
|
||||
ITEM.category = "Combine"
|
||||
ITEM.functions.Open = {
|
||||
OnRun = function(itemTable)
|
||||
local client = itemTable.player
|
||||
local character = client:GetCharacter()
|
||||
|
||||
for _, v in ipairs(itemTable.items) do
|
||||
if (!character:GetInventory():Add(v)) then
|
||||
ix.item.Spawn(v, client)
|
||||
end
|
||||
end
|
||||
|
||||
client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user