- Initiateur de la discussion
N
Nerzh_game
Bambi
- Messages
- 41
- Score réaction
- 1
- Points
- 40
Bonjour,je voulais savoir si il existait un addon permettant de donner au forces de l'ordre le nombre de printer illégale dans la ville.
Développeur de aiekillu, go sur ts.realgame.fr leur acheter.Nerzh_game à dit:Merci de ta réponce mais je pensais plutôt à quelque chose un peu comme sur Glife sur cette photo en haut a gauche.
https://i.ytimg.com/vi/MDuRJxSRzyI/maxresdefault.jpg
#PlagiatImWolfPlays à dit:tiens le premier lien me fait pensé beaucoup à IQ de R6S xD
bonsoir sa m'intéresserai bien aussi si tu peut le partager ^^ sa serait coolMathiouGaming à dit:Non pourquoi?
Je serai grave intéressée !MathiouGaming à dit:Non pourquoi?
Hey, ça fais longtemps é_éMathiouGaming à dit:Attend avant de l'acheter, je peux te le faire je suis en train de me remettre au lua ^^
Tu utilises quel printer?
Heeey ! Oui va fait longtempsxLomble77 à dit:Hey, ça fais longtemps é_é
Je suis aussi intéressé, j'utilise cela : https://scriptfodder.com/scripts/view/768
Si tu pouvais le faire gratuit ce serais super et j'utilise les real printersMathiouGaming à dit:Attend avant de l'acheter, je peux te le faire je suis en train de me remettre au lua ^^
Tu utilises quel printer?
Perso moi j'utilise ça :https://scriptfodder.com/scripts/view/1123/tcb-premium-fg-printersMathiouGaming à dit:Attend avant de l'acheter, je peux te le faire je suis en train de me remettre au lua ^^
Tu utilises quel printer?
Pour moi ça sera texte en haut à gauche qui affiche le nombre de printers en temps réel.MathiouGaming à dit:Ok, vous voulez que ça se fasse comment?
- Texte en haut a gauche qui affiche le nombre de printers en Temps Reel
- Commande dans le chat qui affiche le nombre de printers
- Weapon qui avec une pression de bouton affiche le nombre de printers
Pareil que lomble, avec un petit texte en haut à gaucheMathiouGaming à dit:Ok, vous voulez que ça se fasse comment?
- Texte en haut a gauche qui affiche le nombre de printers en Temps Reel
- Commande dans le chat qui affiche le nombre de printers
- Weapon qui avec une pression de bouton affiche le nombre de printers
SuperMathiouGaming à dit:Okay, je ferait ça après manger alors ^^
re,MathiouGaming à dit:Okay, je ferait ça après manger alors ^^
Super c'est déjà bien !MathiouGaming à dit:J'aurai pas le temps car demain j'ai une grosse journée du coup je vous dirait ça demain
for k, v in pairs( player.GetAll() ) do v:SetNWInt( 'number', v:GetNWInt("number") +1 ) end
for k, v in pairs( player.GetAll() ) do v:SetNWInt( 'number', v:GetNWInt("number") -1 ) end
Personnellement j'aurais fait comme sa :MathiouGaming à dit:if(LocalPlayer():GetUserGroup() == "superadmin") or (LocalPlayer():getDarkRPVar("job") == "Civil Protection") then
Police_Printers = {"Commissaire", "G.I.G.N", "Policier"}
if (table.HasValue(Police_Printers , team.GetName(LocalPlayer():Team()))) then
Non regarde un exemple :Nerzh_game à dit:Alors déjà merci beaucoup a toi mais dans la fonction function ENT:Initialize() il faut mettre ton code dans les parenthèses ?
La fonction se trouve dans le shared.luaMathiouGaming à dit:Alors sv_init
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "MoneyPrinter_Base"
ENT.Author = "CustomHQ"
ENT.Spawnable = false
ENT.AutomaticFrameAdvance = true
if SERVER then include "sv_init.lua" end
AddCSLuaFile "cl_init.lua"
AddCSLuaFile("shared.lua")
ENT.PMoney = 0
ENT.PPower = 50
ENT.PTemp = 6
ENT.PEnable = true
ENT.PCoolerState = "dis"
ENT.PTime = 0
ENT.PPaper = 0
ENT.PColors = 0
function ENT:SetupDataTables() self:NetworkVar("Int", 0, "price") self:NetworkVar("Entity", 0, "owning_ent")
end
-----------------------------------------------------------------------------------
------------------------ START CONFIG ZONE ----------------------------------------
-----------------------------------------------------------------------------------
ENT.PrinterColor = Color(255,251,154,255) -- RGB Color of the printer
ENT.PName = "Imprimante avancÉe"
ENT.MaxMoney = 5000 -- max money saved in printer
ENT.PrintMoney = 350 -- how much money print $$$
ENT.PrintTimeMin = 80 -- minimum print time
ENT.PrintTimeMax = 120 -- maximum print time
ENT.HeatPower = 15 -- every N sec +2 to temperature with calculating current power
ENT.HeatSpeed = 20 -- every 15 sec +N to temperature
ENT.AllowCooller = true -- allow add cooller on our money printer
ENT.PaperEating = 2 -- how much paper eating per 1 print
ENT.ColorEating = 5 -- how much color eating per 1 print
ENT.PapersPerBlock = 50 -- How much paper add per block
ENT.ColorsPerBlock = 30 -- how much colors add per block
ENT.MaxPapers = 140 -- max papers in stock
ENT.MaxColors = 180 -- max color in stock
------------------------------------------------------------------------------------
-------------------------- END CONFIG ZONE -----------------------------------------
------------------------------------------------------------------------------------
ENT.EatMore = true
ENT.IsCustomHQ = true ENT.RenderGroup = RENDERGROUP_BOTH
if CLIENT then
function ENT:Draw() self:DrawModel() -- self:SetMaterial('Models/effects/vol_light001')
-- local pos = self:GetPos() --local ang = self:GetAngles() if not PrintersEnabledAzae then return end local pos = self:CalculateRenderPos() local ang = self:CalculateRenderAng() local w, h = self.Width2D, self.Height2D local x, y = self:CalculateCursorPos() cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,1) cam.End3D2D() ang:RotateAroundAxis(ang:Forward(), -5) pos:Add(self:GetForward() * 1.192) cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,2) cam.End3D2D() local pos = self:CalculateRenderPos2() local ang = self:CalculateRenderAng2() cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,3) cam.End3D2D()
end
end
function ENT:Initialize() self.Scale = 0.1 if CLIENT then self.Mins = self:OBBMins() self.Maxs = self:OBBMaxs() self.Width2D, self.Height2D = (self.Maxs.y - self.Mins.y) / self.Scale , (self.Maxs.z - self.Mins.z) / self.Scale end if SERVER then self:SetModel("models/custom/rprinter.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLID_VPHYSICS) local phys = self:GetPhysicsObject() phys:Wake() phys:SetMass(100) self.damage = 100 self:SetColor(self.PrinterColor) self:SetUseType(SIMPLE_USE) self:SetAngles(self:GetAngles()+Angle(0,180,0)) self.sound = CreateSound(self, Sound("ambient/levels/labs/equipment_printer_loop1.wav")) self.sound:SetSoundLevel(52) self.sound:PlayEx(1, 100) timer.Simple(self.HeatSpeed,function() if IsValid(self) then self:HeatMore() end end) timer.Create(tostring(self:EntIndex()).."printingae",self.PrintTimeMin,1, function() if IsValid(self) then self:PrintMore() end end) self.PTime = CurTime() + self.PrintTimeMin self:UpdateVars() if not self.AllowCooller then self.PCap = ents.Create('prop_dynamic') self.PCap:SetModel('models/custom/printercap.mdl') self.PCap:SetPos(self:GetPos()) self.PCap:SetAngles (self:GetAngles()) self.PCap:SetSolid(0) self.PCap:Spawn() self.PCap:SetParent(self) end end
end
--
function ENT:Use(activator) if CLIENT then return end if self.AlreadyUsed then return end if not IsValid(self.lock) then return end local id = self:LookupSequence("open") self:ResetSequence(id) self.lock:SetParent(nil) self:EmitSound(Sound("doors/door1_move.wav")) self.lock:PhysicsInit(SOLID_VPHYSICS) self.lock:SetMoveType(MOVETYPE_VPHYSICS) self.lock:SetSolid(SOLID_VPHYSICS) self.lock:GetPhysicsObject():SetVelocity(Vector(0,0,-1)) timer.Simple(3,function() if IsValid(self.lock) then self.lock:Remove() end end) if IsValid(self.ply) and activator!=self.ply and not UniqueRewards.CanStoleReward then return end timer.Simple(5,function() if IsValid(self) then self:Remove() end end) --self:EmitSound(Sound("garrysmod/save_load1.wav")) self.AlreadyUsed = true timer.Simple(0.5,function() local enta = ents.Create('reward_present') enta:SetPos(self:GetPos()+self:GetForward()*13 + Vector(0,0,25)) enta.ply = self.ply enta.Progress = self.Progress enta:Spawn() end)
end
function ENT:OnRemove() if self.sound then self.sound:Stop() end if self.PCooler and self.PCooler.sound then self.PCooler.sound:Stop() end
end
Ok bon bah je t'attend après que tu es manger pour la ligne de codeMathiouGaming à dit:J'arrive après manger du coup mais ouai c'est chaud avec des printers différents plus tard je créérai carément mon printer
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "MoneyPrinter_Base"
ENT.Author = "CustomHQ"
ENT.Spawnable = false
ENT.AutomaticFrameAdvance = true
if SERVER then include "sv_init.lua" end
AddCSLuaFile "cl_init.lua"
AddCSLuaFile("shared.lua")
ENT.PMoney = 0
ENT.PPower = 50
ENT.PTemp = 6
ENT.PEnable = true
ENT.PCoolerState = "dis"
ENT.PTime = 0
ENT.PPaper = 0
ENT.PColors = 0
function ENT:SetupDataTables() self:NetworkVar("Int", 0, "price") self:NetworkVar("Entity", 0, "owning_ent")
end
-----------------------------------------------------------------------------------
------------------------ START CONFIG ZONE ----------------------------------------
-----------------------------------------------------------------------------------
ENT.PrinterColor = Color(255,251,154,255) -- RGB Color of the printer
ENT.PName = "Imprimante avancÉe"
ENT.MaxMoney = 5000 -- max money saved in printer
ENT.PrintMoney = 350 -- how much money print $$$
ENT.PrintTimeMin = 80 -- minimum print time
ENT.PrintTimeMax = 120 -- maximum print time
ENT.HeatPower = 15 -- every N sec +2 to temperature with calculating current power
ENT.HeatSpeed = 20 -- every 15 sec +N to temperature
ENT.AllowCooller = true -- allow add cooller on our money printer
ENT.PaperEating = 2 -- how much paper eating per 1 print
ENT.ColorEating = 5 -- how much color eating per 1 print
ENT.PapersPerBlock = 50 -- How much paper add per block
ENT.ColorsPerBlock = 30 -- how much colors add per block
ENT.MaxPapers = 140 -- max papers in stock
ENT.MaxColors = 180 -- max color in stock
------------------------------------------------------------------------------------
-------------------------- END CONFIG ZONE -----------------------------------------
------------------------------------------------------------------------------------
ENT.EatMore = true
ENT.IsCustomHQ = true
ENT.RenderGroup = RENDERGROUP_BOTH
if CLIENT then
function ENT:Draw() self:DrawModel() -- self:SetMaterial('Models/effects/vol_light001')
-- local pos = self:GetPos() --local ang = self:GetAngles() if not PrintersEnabledAzae then return end local pos = self:CalculateRenderPos() local ang = self:CalculateRenderAng() local w, h = self.Width2D, self.Height2D local x, y = self:CalculateCursorPos() cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,1) cam.End3D2D() ang:RotateAroundAxis(ang:Forward(), -5) pos:Add(self:GetForward() * 1.192) cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,2) cam.End3D2D() local pos = self:CalculateRenderPos2() local ang = self:CalculateRenderAng2() cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,3) cam.End3D2D()
end
end
function ENT:Initialize() self.Scale = 0.1 if CLIENT then self.Mins = self:OBBMins() self.Maxs = self:OBBMaxs() self.Width2D, self.Height2D = (self.Maxs.y - self.Mins.y) / self.Scale , (self.Maxs.z - self.Mins.z) / self.Scale end if SERVER then self:SetModel("models/custom/rprinter.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLID_VPHYSICS) local phys = self:GetPhysicsObject() phys:Wake() phys:SetMass(100) self.damage = 100 self:SetColor(self.PrinterColor) self:SetUseType(SIMPLE_USE) self:SetAngles(self:GetAngles()+Angle(0,180,0)) self.sound = CreateSound(self, Sound("ambient/levels/labs/equipment_printer_loop1.wav")) self.sound:SetSoundLevel(52) self.sound:PlayEx(1, 100) timer.Simple(self.HeatSpeed,function() if IsValid(self) then self:HeatMore() end end) timer.Create(tostring(self:EntIndex()).."printingae",self.PrintTimeMin,1, function() if IsValid(self) then self:PrintMore() end end) self.PTime = CurTime() + self.PrintTimeMin self:UpdateVars()
for k, v in pairs( player.GetAll() ) do
v:SetNWInt( 'number', v:GetNWInt("number") +1 )
end if not self.AllowCooller then self.PCap = ents.Create('prop_dynamic') self.PCap:SetModel('models/custom/printercap.mdl') self.PCap:SetPos(self:GetPos()) self.PCap:SetAngles (self:GetAngles()) self.PCap:SetSolid(0) self.PCap:Spawn() self.PCap:SetParent(self) end end
end
--
function ENT:Use(activator) if CLIENT then return end if self.AlreadyUsed then return end if not IsValid(self.lock) then return end local id = self:LookupSequence("open") self:ResetSequence(id) self.lock:SetParent(nil) self:EmitSound(Sound("doors/door1_move.wav")) self.lock:PhysicsInit(SOLID_VPHYSICS) self.lock:SetMoveType(MOVETYPE_VPHYSICS) self.lock:SetSolid(SOLID_VPHYSICS) self.lock:GetPhysicsObject():SetVelocity(Vector(0,0,-1)) timer.Simple(3,function() if IsValid(self.lock) then self.lock:Remove() end end) if IsValid(self.ply) and activator!=self.ply and not UniqueRewards.CanStoleReward then return end timer.Simple(5,function() if IsValid(self) then self:Remove() end end) --self:EmitSound(Sound("garrysmod/save_load1.wav")) self.AlreadyUsed = true timer.Simple(0.5,function() local enta = ents.Create('reward_present') enta:SetPos(self:GetPos()+self:GetForward()*13 + Vector(0,0,25)) enta.ply = self.ply enta.Progress = self.Progress enta:Spawn() end)
end
function ENT:OnRemove() if self.sound then self.sound:Stop() end
for k, v in pairs( player.GetAll() ) do
v:SetNWInt( 'number', v:GetNWInt("number") -1 )
end if self.PCooler and self.PCooler.sound then self.PCooler.sound:Stop() end
end
Ok mais tu aurais pas oublier :MathiouGaming à dit:Remplace le shared.lua par ça ^^
Code:ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "MoneyPrinter_Base" ENT.Author = "CustomHQ" ENT.Spawnable = false ENT.AutomaticFrameAdvance = true if SERVER then include "sv_init.lua" end AddCSLuaFile "cl_init.lua" AddCSLuaFile("shared.lua") ENT.PMoney = 0 ENT.PPower = 50 ENT.PTemp = 6 ENT.PEnable = true ENT.PCoolerState = "dis" ENT.PTime = 0 ENT.PPaper = 0 ENT.PColors = 0 function ENT:SetupDataTables() self:NetworkVar("Int", 0, "price") self:NetworkVar("Entity", 0, "owning_ent") end ----------------------------------------------------------------------------------- ------------------------ START CONFIG ZONE ---------------------------------------- ----------------------------------------------------------------------------------- ENT.PrinterColor = Color(255,251,154,255) -- RGB Color of the printer ENT.PName = "Imprimante avancÉe" ENT.MaxMoney = 5000 -- max money saved in printer ENT.PrintMoney = 350 -- how much money print $$$ ENT.PrintTimeMin = 80 -- minimum print time ENT.PrintTimeMax = 120 -- maximum print time ENT.HeatPower = 15 -- every N sec +2 to temperature with calculating current power ENT.HeatSpeed = 20 -- every 15 sec +N to temperature ENT.AllowCooller = true -- allow add cooller on our money printer ENT.PaperEating = 2 -- how much paper eating per 1 print ENT.ColorEating = 5 -- how much color eating per 1 print ENT.PapersPerBlock = 50 -- How much paper add per block ENT.ColorsPerBlock = 30 -- how much colors add per block ENT.MaxPapers = 140 -- max papers in stock ENT.MaxColors = 180 -- max color in stock ------------------------------------------------------------------------------------ -------------------------- END CONFIG ZONE ----------------------------------------- ------------------------------------------------------------------------------------ ENT.EatMore = true ENT.IsCustomHQ = true ENT.RenderGroup = RENDERGROUP_BOTH if CLIENT then function ENT:Draw() self:DrawModel() -- self:SetMaterial('Models/effects/vol_light001') -- local pos = self:GetPos() --local ang = self:GetAngles() if not PrintersEnabledAzae then return end local pos = self:CalculateRenderPos() local ang = self:CalculateRenderAng() local w, h = self.Width2D, self.Height2D local x, y = self:CalculateCursorPos() cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,1) cam.End3D2D() ang:RotateAroundAxis(ang:Forward(), -5) pos:Add(self:GetForward() * 1.192) cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,2) cam.End3D2D() local pos = self:CalculateRenderPos2() local ang = self:CalculateRenderAng2() cam.Start3D2D(pos, ang, self.Scale) self:Paint(w, h, x, y,3) cam.End3D2D() end end function ENT:Initialize() self.Scale = 0.1 if CLIENT then self.Mins = self:OBBMins() self.Maxs = self:OBBMaxs() self.Width2D, self.Height2D = (self.Maxs.y - self.Mins.y) / self.Scale , (self.Maxs.z - self.Mins.z) / self.Scale end if SERVER then self:SetModel("models/custom/rprinter.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLID_VPHYSICS) local phys = self:GetPhysicsObject() phys:Wake() phys:SetMass(100) self.damage = 100 self:SetColor(self.PrinterColor) self:SetUseType(SIMPLE_USE) self:SetAngles(self:GetAngles()+Angle(0,180,0)) self.sound = CreateSound(self, Sound("ambient/levels/labs/equipment_printer_loop1.wav")) self.sound:SetSoundLevel(52) self.sound:PlayEx(1, 100) timer.Simple(self.HeatSpeed,function() if IsValid(self) then self:HeatMore() end end) timer.Create(tostring(self:EntIndex()).."printingae",self.PrintTimeMin,1, function() if IsValid(self) then self:PrintMore() end end) self.PTime = CurTime() + self.PrintTimeMin self:UpdateVars() for k, v in pairs( player.GetAll() ) do v:SetNWInt( 'number', v:GetNWInt("number") +1 ) end if not self.AllowCooller then self.PCap = ents.Create('prop_dynamic') self.PCap:SetModel('models/custom/printercap.mdl') self.PCap:SetPos(self:GetPos()) self.PCap:SetAngles (self:GetAngles()) self.PCap:SetSolid(0) self.PCap:Spawn() self.PCap:SetParent(self) end end end -- function ENT:Use(activator) if CLIENT then return end if self.AlreadyUsed then return end if not IsValid(self.lock) then return end local id = self:LookupSequence("open") self:ResetSequence(id) self.lock:SetParent(nil) self:EmitSound(Sound("doors/door1_move.wav")) self.lock:PhysicsInit(SOLID_VPHYSICS) self.lock:SetMoveType(MOVETYPE_VPHYSICS) self.lock:SetSolid(SOLID_VPHYSICS) self.lock:GetPhysicsObject():SetVelocity(Vector(0,0,-1)) timer.Simple(3,function() if IsValid(self.lock) then self.lock:Remove() end end) if IsValid(self.ply) and activator!=self.ply and not UniqueRewards.CanStoleReward then return end timer.Simple(5,function() if IsValid(self) then self:Remove() end end) --self:EmitSound(Sound("garrysmod/save_load1.wav")) self.AlreadyUsed = true timer.Simple(0.5,function() local enta = ents.Create('reward_present') enta:SetPos(self:GetPos()+self:GetForward()*13 + Vector(0,0,25)) enta.ply = self.ply enta.Progress = self.Progress enta:Spawn() end) end function ENT:OnRemove() if self.sound then self.sound:Stop() end for k, v in pairs( player.GetAll() ) do v:SetNWInt( 'number', v:GetNWInt("number") -1 ) end if self.PCooler and self.PCooler.sound then self.PCooler.sound:Stop() end end