LilBubs Posted May 6, 2018 Share Posted May 6, 2018 A crate that generates points through a 10 meter radius on all points earned via zombie killing. Collect points through the crate (around a 5% or 10% point pickup rate) 2 Quote Link to comment Share on other sites More sharing options...
LilBubs Posted May 6, 2018 Author Share Posted May 6, 2018 example lua: entities > customzs_collecter (originally a darkrp basic printer) include("shared.lua") surface.CreateFont( "MoneyFont", { font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name size = 30, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "MoneyFontCAM", { font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name size = 75, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) function ENT:Draw() self:DrawModel() local ang = self:GetAngles() ang:RotateAroundAxis(self:GetAngles():Right(), 90) cam.Start3D2D(self:GetPos(),self:GetAngles(),0.1) draw.RoundedBox(0,0,0,200,200,Color(120,255,120,255)) draw.RoundedBox(0,0,0,200-75,200-175,Color(255,255,255,255)) draw.SimpleText("GetMoneyAmount","MoneyFontCAM",50,50,Color(120,120,255),1, 1) cam.End3D2D() end hook.Add( "HUDPaint" , "DrawMoney" , function() local eye = LocalPlayer() :GetEyeTrace() if eye.Entity:GetClass() == "cam3d" then draw.SimpleText(eye.Entity:GetMoneyAmount(), "MoneyFont",ScrW()/2, ScrH()/2 , Color(255,0,0) , 1 , 1) end end) Quote Link to comment Share on other sites More sharing options...
LilBubs Posted May 6, 2018 Author Share Posted May 6, 2018 Lua cont. example: still lua for dark rp printer AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") local interval = 1.5 function ENT:Initialize() self:SetModel("models/props_c17/consolebox03a.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLID_VPHYSICS) self.timer = CurTime() local phys = self:GetPhysicsObject() if phys:IsValid() then phys:Wake() end end function ENT:Think() if CurTime() > self.timer + interval then self.timer = CurTime() self:SetMoneyAmount(self:GetMoneyAmount() + 100 ) end end function ENT:Use(a , c) local money = self:GetMoneyAmount() self:SetMoneyAmount(0) c:addMoney(money) end Quote Link to comment Share on other sites More sharing options...
LilBubs Posted May 6, 2018 Author Share Posted May 6, 2018 shared file for printer ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Custom Money Printer" ENT.Spawnable = true function ENT:SetupDataTables() self:NetworkVar("Int", 1 ,"MoneyAmount") end Quote Link to comment Share on other sites More sharing options...
LilBubs Posted May 6, 2018 Author Share Posted May 6, 2018 Basic lua code for a dark RP printer, can be re purposed into a point collection crate in ZS Quote Link to comment Share on other sites More sharing options...
Aachen Posted July 20, 2018 Share Posted July 20, 2018 Late reply, I'm guessing every human will be able to pick up points from the crate? Sounds like a cool concept but it seems the only purpose of it is to get points? Sounds fairly weak to me. Quote Link to comment Share on other sites More sharing options...
KeanuV Posted July 23, 2018 Share Posted July 23, 2018 sounds cool Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.