• Help with 3d2d cursor
    0 replies, posted
Can someone help me make a cursor on my enttitie? here is a try for making it: board/init.lua: -------------------------------------------------------------------------------------------------------------------------------------- AddCSLuaFile( 'cl_init.lua' ) AddCSLuaFile( 'shared.lua' ) include( 'shared.lua' ) function ENT:Initialize() self:SetModel( "models/hunter/plates/plate3x5.mdl" ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSICS ) local phys = self:GetPhysicsObject() if phys:IsValid() then phys:EnableMotion(false) end self:SetNWBool( "ScoreBG", false ) end -------------------------------------------------------------------------------------------------------------------------------------- board/cl_init.lua: -------------------------------------------------------------------------------------------------------------------------------------- include("shared.lua") function ENT:Draw() self:DrawModel() local ply = LocalPlayer() if (self:GetNWBool("ScoreBG")) then thecolor = Color( 0, 0, 255, 100 ) else thecolor = Color( 0, 255, 255, 100 ) end playercolor = Color( 255, 0, 255, 255 ) local height = 710 local width = 1185 cam.Start3D2D(self:GetPos() + self:GetAngles():Up() * 1.6 + self:GetAngles():Forward() * 71 - self:GetAngles():Right() * 118.5, self:GetAngles() + Angle(90, 270, 90), 0.2) local pos = util.IntersectRayWithPlane(ply:GetShootPos() , ply:GetAimVector(), self:GetPos() + self:GetAngles():Up() * 1.6 + self:GetAngles():Forward() * 71 - self:GetAngles():Right() * 118.5, self:GetAngles():Up()) draw.RoundedBox(0,-pos.y*1,-pos.z*1, 100, 100, Color( 255, 255, 255, 255 )) draw.RoundedBox(0,0,0, 1185, 710, Color( 0, 255, 255, 50 )) local offset = 0 for k, v in pairs(player.GetAll()) do if (v:GetNWBool( "inque" )) then offset = offset + 1 draw.RoundedBox(0,0,offset*35-35, 600, 30, playercolor) draw.SimpleText(k.." "..v:Nick() , "ScoreBoard1", 10, offset*35-35, Color(0,0,0,255), 0,0) end end cam.End3D2D() end --------------------------------------------------------------------------------------------------------------------------------------
Sorry, you need to Log In to post a reply to this thread.