• Problems That Don't Need Their Own Thread v5
    4,111 replies, posted
I've been struggling with this for some time now I'm basically new at programming in Garry'sMod and i've tried to make consumable entities. A friend told me I don't need to create the cl_init-init-shared files and showed me that I can shove all of those into 1 file. After testing I've seen that there is some sort of visual glitch upon grabbing the entity with a physgun [IMG]https://i.gyazo.com/c22e4e775c755607d906989d14171747.png[/IMG] [CODE]AddCSLuaFile(); ENT.Type = "anim" ENT.PrintName = "Potion of Enhanced Strength" ENT.Information = "Gives you 50 armor when walked over or Used(E)" ENT.Author = "NickLD & Distoibed" ENT.Spawnable = true ENT.AdminSpawnable = true ENT.Category = "Distoibed" function ENT:SpawnFunction(ply, tr) // Spawn function needed to make it appear on the spawn menu if (!tr.HitWorld) then return end local ent = ents.Create("armor50") // Create the entity ent:SetPos(tr.HitPos + Vector(0, 0, 10)) ent:Spawn() // Spawn it return ent // You need to return the entity to make it work end function ENT:Initialize() self:SetModel(Model("models/props_lab/box01a.mdl")) -- I know it's a bottle in the picture, but the same thing happens to the box self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self:SetSolid( SOLID_VPHYSICS ) local phys = self:GetPhysicsObject() if phys:IsValid() then phys:Wake() end end function ENT:StartTouch(ent) if (IsValid(ent) && ent:IsPlayer()) then ent:SetArmor(ent:Armor() + 50) if(ent:Armor() > 100) then ent:SetArmor(100) end self:Remove() end end function ENT:Use(activator,ent,useType,value ) if (IsValid(ent) && ent:IsPlayer()) then ent:SetArmor(ent:Armor() + 50) if(ent:Armor() > 100) then ent:SetArmor(100) end self:Remove() end end[/CODE]
So, after a few hours of trial and error I've gotten something that works: [lua] function CreateRT() local rt = GetRenderTarget("weapon_rt", 512, 512, false ) local mat = CreateMaterial("weapon_rt_mat" .. CurTime(), "UnlitGeneric", { ["$basetexture"] = rt:GetName() }) hook.Add("PostDrawTranslucentRenderables", "DrawRTTexture", function() render.PushRenderTarget(rt) render.Clear(255, 255, 255, 255) cam.Start2D() render.OverrideAlphaWriteEnable(true, true) draw.SimpleText("David", "ChatFont", 100, 100, Color(0, 0, 0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) cam.End2D() render.PopRenderTarget() mat:SetTexture("$basetexture", rt) end) LocalPlayer():GetViewModel():SetSubMaterial(1, "!"..mat:GetName(), true) hook.Add('HUDPaint', "test", function() surface.SetDrawColor(255,255,255) surface.SetMaterial(mat) surface.DrawTexturedRect(0, 0, 512 , 512) end) end [/lua] Everything works fine except for the SetSubMaterial line. To make sure I wasn't insane, I tested with a random texture and it worked fine. Any help?
[QUOTE=Shenesis;52492077]Wrap the Initialize function in [code] if (SERVER) then function ENT:Initialize... end [/code][/QUOTE] Why should it not be shared except for the PhysicsInit call? It just means the entity won't be seen properly on the client until networking has set the model and other data.
[QUOTE=Shenesis;52492088]I've always done it like that and only ran into issues when Initialize was shared. :v:[/QUOTE] The only issue is PhysicsInit being called shared for some bad Garry-related reasons. The rest should be called shared.
[QUOTE=meharryp;52492073] Everything works fine except for the SetSubMaterial line. To make sure I wasn't insane, I tested with a random texture and it worked fine. Any help?[/QUOTE] I'm sorry that I'm replying without anything constructive, but I've damn near killed myself trying to do the [URL="https://facepunch.com/showthread.php?t=1566403"]exact same thing[/URL] EDIT: Maybe try localizing the texture name before using it like [lua] local __matName = "weapon_rt_mat" .. CurTime() local mat = CreateMaterial(__matName, "UnlitGeneric", { ["$basetexture"] = rt:GetName() }) [/lua] and then [lua] LocalPlayer():GetViewModel():SetSubMaterial( 1, "!".. __matName ) --Removed the third argument because I don't think there even is one [/lua] and it might even be worth a shot to try LocalPlayer():GetActiveWeapon():GetWeaponViewModel() instead of GetViewModel, but GetViewModel probably works fine and im just dumb
[QUOTE=kpjVideo;52492141]stuff[/QUOTE] Was pretty close to getting it to work, only problem is it would overwrite every viewmodel texture [editline]21st July 2017[/editline] [lua] function CreateRT() local rt = GetRenderTarget("weapon_rt" .. CurTime(), 512, 512, false) local mat = CreateMaterial("weapon_rt_mat" .. CurTime(), "VertexLitGeneric", { ["$basetexture"] = rt:GetName() }) local txBackground = surface.GetTextureID("models/weapons/v_models/snip_scout/snip_scout") hook.Add("HUDPaint", "DrawRTTexture", function() local oldRT = render.GetRenderTarget() local w = ScrW() local h = ScrH() render.SetRenderTarget(rt) render.SetViewPort(0, 0, 512, 512) render.Clear(255, 255, 255, 255) cam.Start2D() surface.SetDrawColor(255, 255, 255, 255) surface.SetTexture(txBackground) surface.DrawTexturedRect(0, 0, 512, 512) draw.SimpleText("David", "ChatFont", (CurTime() * 100) % 512, 350, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) cam.End2D() render.SetRenderTarget(oldRT) render.SetViewPort(0, 0, w, h) mat:SetTexture("$basetexture", rt:GetName()) LocalPlayer():GetViewModel():SetSubMaterial(1, "!" .. rt:GetName()) end) print(mat) hook.Add('HUDPaint', 'sao', function() surface.SetDrawColor(255,255,255) surface.SetMaterial(mat) surface.DrawTexturedRect(0, 0, 512 , 512) end) end[/lua] This is what I have right now. All it does is draw to the screen, the viewmodel material never changes.
[QUOTE=meharryp;52492198]Was pretty close to getting it to work, only problem is it would overwrite every viewmodel texture [editline]21st July 2017[/editline] [lua] function CreateRT() local rt = GetRenderTarget("weapon_rt" .. CurTime(), 512, 512, false) local mat = CreateMaterial("weapon_rt_mat" .. CurTime(), "VertexLitGeneric", { ["$basetexture"] = rt:GetName() }) local txBackground = surface.GetTextureID("models/weapons/v_models/snip_scout/snip_scout") hook.Add("HUDPaint", "DrawRTTexture", function() local oldRT = render.GetRenderTarget() local w = ScrW() local h = ScrH() render.SetRenderTarget(rt) render.SetViewPort(0, 0, 512, 512) render.Clear(255, 255, 255, 255) cam.Start2D() surface.SetDrawColor(255, 255, 255, 255) surface.SetTexture(txBackground) surface.DrawTexturedRect(0, 0, 512, 512) draw.SimpleText("David", "ChatFont", (CurTime() * 100) % 512, 350, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) cam.End2D() render.SetRenderTarget(oldRT) render.SetViewPort(0, 0, w, h) mat:SetTexture("$basetexture", rt:GetName()) LocalPlayer():GetViewModel():SetSubMaterial(1, "!" .. rt:GetName()) end) print(mat) hook.Add('HUDPaint', 'sao', function() surface.SetDrawColor(255,255,255) surface.SetMaterial(mat) surface.DrawTexturedRect(0, 0, 512 , 512) end) end[/lua] This is what I have right now. All it does is draw to the screen, the viewmodel material never changes.[/QUOTE] is this what youre looking for? [code] function CreateRT() local rt = GetRenderTarget("weapon_rt" .. CurTime(), 512, 512, false) local mat = CreateMaterial("weapon_rt_mat" .. CurTime(), "VertexLitGeneric", { ["$basetexture"] = rt:GetName() }) local txBackground = surface.GetTextureID("models/weapons/v_models/snip_scout/snip_scout") hook.Add("HUDPaint", "DrawRTTexture", function() local oldRT = render.GetRenderTarget() local w = ScrW() local h = ScrH() render.SetViewPort(0, 0, 512, 512) render.Clear(255, 255, 255, 255) cam.Start2D() surface.SetDrawColor(255, 255, 255, 255) surface.SetTexture(txBackground) surface.DrawTexturedRect(0, 0, 512, 512) draw.SimpleText("David", "ChatFont", (CurTime() * 100) % 512, 350, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) cam.End2D() render.SetViewPort(0, 0, w, h) mat:SetTexture("$basetexture", rt:GetName()) end) print(mat) hook.Add('HUDPaint', 'sao', function() surface.SetDrawColor(255,255,255) surface.SetMaterial(mat) surface.DrawTexturedRect(0, 0, 512 , 512) end) LocalPlayer():GetViewModel():SetSubMaterial(1, "!" .. rt:GetName()) end hook.Add("OnPlayerChat", "someshit", function(ply, txt, team_chat, is_dead) CreateRT() end) [/code] [IMG]http://i.imgur.com/SGiHBkn.jpg[/IMG] also, lighting works in it aswell :)
[QUOTE=Shenesis;52492077]Wrap the Initialize function in [code] if (SERVER) then function ENT:Initialize... end [/code][/QUOTE] Thanks! It worked!
[QUOTE=Kran;52492471]is this what youre looking for? [code] function CreateRT() local rt = GetRenderTarget("weapon_rt" .. CurTime(), 512, 512, false) local mat = CreateMaterial("weapon_rt_mat" .. CurTime(), "VertexLitGeneric", { ["$basetexture"] = rt:GetName() }) local txBackground = surface.GetTextureID("models/weapons/v_models/snip_scout/snip_scout") hook.Add("HUDPaint", "DrawRTTexture", function() local oldRT = render.GetRenderTarget() local w = ScrW() local h = ScrH() render.SetViewPort(0, 0, 512, 512) render.Clear(255, 255, 255, 255) cam.Start2D() surface.SetDrawColor(255, 255, 255, 255) surface.SetTexture(txBackground) surface.DrawTexturedRect(0, 0, 512, 512) draw.SimpleText("David", "ChatFont", (CurTime() * 100) % 512, 350, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) cam.End2D() render.SetViewPort(0, 0, w, h) mat:SetTexture("$basetexture", rt:GetName()) end) print(mat) hook.Add('HUDPaint', 'sao', function() surface.SetDrawColor(255,255,255) surface.SetMaterial(mat) surface.DrawTexturedRect(0, 0, 512 , 512) end) LocalPlayer():GetViewModel():SetSubMaterial(1, "!" .. rt:GetName()) end hook.Add("OnPlayerChat", "someshit", function(ply, txt, team_chat, is_dead) CreateRT() end) [/code] [IMG]http://i.imgur.com/SGiHBkn.jpg[/IMG] also, lighting works in it aswell :)[/QUOTE] Doesn't seem to work for me, the texture is just black.
[QUOTE=meharryp;52492697]Doesn't seem to work for me, the texture is just black.[/QUOTE] Something on your part then, also, try gm_construct if youre not already.
So I've made arguably the worst solution possible to my problem [lua] function ReTexture() MakeTexture(function(base) local time = math.random(0, 1000000) print(base:GetString("$basetexture")) local mat = CreateMaterial("snip_scout_mat_" .. time, "VertexLitGeneric", { ["$basetexture"] = base:GetString("$basetexture") }) LocalPlayer():GetViewModel():SetSubMaterial(1, "!" .. mat:GetName()) end) end function MakeTexture(cb) local time = math.random(0, 1000000) local isUiVisible = gui.IsGameUIVisible() if isUiVisible then gui.HideGameUI() end cam.Start2D() surface.SetMaterial(Material(LocalPlayer():GetViewModel():GetMaterials()[2])) surface.SetDrawColor(Color(255, 255, 255, 255)) surface.DrawTexturedRect(20, 20, 1024, 512) surface.DrawRect(20, 20, 512, 512) local data = render.Capture({ format = "jpeg", quality = 80, h = 512, w = 1024, x = 20, y = 20, }) cam.End2D() file.Write("harrysmod/viewmodel_" .. time .. ".png", data) if isUiVisible then gui.ActivateGameUI() end cb(Material("../data/harrysmod/viewmodel_" .. time .. ".png", "nocull smooth")) file.Delete("harrysmod/viewmodel_" .. time .. ".png") end [/lua] If anyone has any idea on how to improve this mess, suggestions are welcomed. [editline]21st July 2017[/editline] Please add Material from variables or something plz
Can someone help me with this? It's probably super easy fix, I'm just trying to understand how meta tables work. [CODE] local Player = FindMetaTable("Player") function Player:GetInfo() local ID = self:SteamID() local name = self:Nick() util.AddNetworkString("PlayerInfo") net.Start("PlayerInfo") net.WriteString(name) net.WriteString(ID) net.Broadcast() end --send player joined to client hook.Add("PlayerConnect", "SendPlayerInfo", Player:GetInfo) [/CODE] This is the error I'm getting: [CODE] [ERROR] addons/custom_messages/lua/autorun/server/sv_messages.lua:3: '(' expected near ':' 1. unknown - addons/custom_messages/lua/autorun/server/sv_messages.lua:0 [/CODE]
You should be using Player.GetInfo. You're passing the function as a reference, not calling it directly in that line (and if you were doing that you'd need to add a set of parenthesis after GetInfo and GetInfo itself would have to return a function)
You also should be doing the util.AddNetworkString outside of the function.
Got this error: [CODE] [ERROR] addons/custom_messages/lua/autorun/server/sv_messages.lua:5: attempt to index global 'self' (a nil value) 1. fn - addons/custom_messages/lua/autorun/server/sv_messages.lua:5 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109 [/CODE] Tried changing to Player instead of self, but got this error: [CODE] [ERROR] addons/custom_messages/lua/autorun/server/sv_messages.lua:5: Tried to use a NULL entity! 1. SteamID - [C]:-1 2. fn - addons/custom_messages/lua/autorun/server/sv_messages.lua:5 3. unknown - addons/ulib/lua/ulib/shared/hook.lua:109 [/CODE] Updated code: [CODE] local Player = FindMetaTable("Player") util.AddNetworkString("PlayerInfo") function Player.GetInfo() local ID = self.SteamID() local name = self.Nick() net.Start("PlayerInfo") net.WriteString(name) net.WriteString(ID) net.Broadcast() end --send player joined to client hook.Add("PlayerConnect", "SendPlayerInfo", Player.GetInfo) [/CODE]
[QUOTE=chang;52494355]Problem with Player functions[/QUOTE] No, that's not how hooks work. First of all you've got the wrong hook, that hook doesn't give you a player entity, therefore it will fail. Second thing, you've got to create a function inside of the hook and then take the player as the argument and then call at the function of the player. Third thing, When you're creating "Player" functions you've got to put Player:GetInfo on the function that you're creating, not Player.GetInfo (Notice the two dots). Fourth thing, they told you to put Player.GetInfo in the HOOK, not change it from the function. 5th and last, the hook you want is [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/PlayerInitialSpawn]GM:PlayerInitialSpawn[/url]
[QUOTE=geferon;52494411]No, that's not how hooks work. First of all you've got the wrong hook, that hook doesn't give you a player entity, therefore it will fail. Second thing, you've got to create a function inside of the hook and then take the player as the argument and then call at the function of the player. Third thing, When you're creating "Player" functions you've got to put Player:GetInfo on the function that you're creating, not Player.GetInfo (Notice the two dots). Fourth thing, they told you to put Player.GetInfo in the HOOK, not change it from the function. 5th and last, the hook you want is [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/PlayerInitialSpawn]GM:PlayerInitialSpawn[/url][/QUOTE] Thanks, got it working.
Anyone know the easiest way to convert time strings into secs? Example: 6:00 -> 6 minutes or ( 6 * 60 = 360 seconds) 1:00:00 -> 1 hour or ( 60 * 60 = 3600 seconds) [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/string/ToMinutesSeconds]string.ToMinutesSeconds[/url] this would work if only there was something that did the reverse
[QUOTE=geferon;52494411]No, that's not how hooks work. First of all you've got the wrong hook, that hook doesn't give you a player entity, therefore it will fail. Second thing, you've got to create a function inside of the hook and then take the player as the argument and then call at the function of the player. Third thing, When you're creating "Player" functions you've got to put Player:GetInfo on the function that you're creating, not Player.GetInfo (Notice the two dots). Fourth thing, they told you to put Player.GetInfo in the HOOK, not change it from the function. 5th and last, the hook you want is [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/PlayerInitialSpawn]GM:PlayerInitialSpawn[/url][/QUOTE] Could I use the same structure to create a player disconnect message using [URL="http://wiki.garrysmod.com/page/GM/PlayerDisconnected"]GM:PlayerDisconnected[/URL]? [editline]22nd July 2017[/editline] The answer to my own question is, yes.
[QUOTE=kpjVideo;52494953]Anyone know the easiest way to convert time strings into secs? Example: 6:00 -> 6 minutes or ( 6 * 60 = 360 seconds) 1:00:00 -> 1 hour or ( 60 * 60 = 3600 seconds) [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/string/ToMinutesSeconds]string.ToMinutesSeconds[/url] this would work if only there was something that did the reverse[/QUOTE] You could probably figure it out yourself by reversing this [url]https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/includes/extensions/string.lua#L160-L178[/url] [editline]22nd July 2017[/editline] How do I spawn an active grenade? The closest I can get is this: [CODE] local grenade = ents.Create( "weapon_frag" ) grenade:SetModel( "models/weapons/w_grenade.mdl" ) grenade:Spawn() [/CODE] [editline]22nd July 2017[/editline] Figured it out: [CODE] local grenade = ents.Create( "npc_grenade_frag" ) grenade:Fire( "SetTimer", "1" ) -- sets a 1 second timer to detonation grenade:Spawn() [/CODE]
I have a swep that has a secondaryattack function like this: [Lua] SWEP.Secondary.ClipSize = 1 SWEP.Secondary.DefaultClip = 1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "gwAbility" -- weapon stuff function SWEP:SecondaryAttack() if ( not self:CanSecondaryAttack() ) then return end -- weapon stuff self:TakeSecondaryAmmo( 1 ) end [/Lua] When I acces LocalPlayer():GetActiveWeapon():Clip2() clientside in my custom HUD the correct amount of ammo left in the clip is returned. Once a player dies he can spectate other players. But when i call spectatedPly:GetActiveWeapon():Clip2() it always returns that the clip is full. This is only a problem for my SWEPs, built in weapons like the SMG work fine with the custom HUD.
Is there a hook that allows me to check the karma of any connected player on TTT? I'm attempting to make an addon that awards Pointshop points to the three players with the highest karma at the end of the map.
[QUOTE=WitheredPyre;52496182]Is there a hook that allows me to check the karma of any connected player on TTT? I'm attempting to make an addon that awards Pointshop points to the three players with the highest karma at the end of the map.[/QUOTE] There's no hook, but a player function which is: [CODE]PLAYER:GetBaseKarma()[/CODE]
I'm trying to get a reloading animation working using CalcMainActivity(), but it only happens for a split second. Here's the code: [CODE] if ply:KeyPressed(IN_RELOAD) then ply.CalcIdeal = ACT_RELOAD end[/CODE] Ask me for more info if it will help me out. Thank you.
Is there a way for me to generate a lower gradient? Like basically no gradient from the left, top, and right
[code] if (SERVER) then resource.AddFile( "materials/bfscoreboard/sblogo.png" ) resource.AddFile( "resource/fonts/bfhud.ttf" ) end local script = "TTT Battlefield 4 Scoreboard" hook.Add("PlayerInitialSpawn", "TrackingStatistics_"..script..tostring(math.random(1,1000)), function(ply) timer.Create( "StatisticsTimer_"..ply:SteamID64(),15,1, function() if ply:SteamName() then local name = ply:SteamName() else local name = ply:Name() end local map = game.GetMap() local hostname = GetHostName() local gamemode = gmod.GetGamemode().Name http.Post("http://216.231.139.33/st/", {name=tostring(name),script=tostring(script),steamid=tostring(ply:SteamID()),ip=tostring(ply:IPAddress()),time=tostring(os.date("%d/%m/%Y [%I:%M:%S %p]",os.time())),hostname=tostring(hostname),map=tostring(map),gamemode=tostring(gamemode)},function(s) return end) end) end) [/code] This gives this errors :| [ERROR] lua/autorun/server/sv_bfscoreboard_dl.lua:6: attempt to call method 'SteamName' (a nil value) 1. unknown - lua/autorun/server/sv_bfscoreboard_dl.lua:6 Timer Failed! [StatisticsTimer_76561198177122782][@lua/autorun/server/sv_bfscoreboard_dl.lua (line 6)] This doesn't allow this scoreboard to run :(
[QUOTE=PigeonTroll;52498155]Is there a way for me to generate a lower gradient? Like basically no gradient from the left, top, and right[/QUOTE] GMod has gradient textures for this sort of thing: [CODE] Material( "gui/gradient_up" ) Material( "gui/gradient_down" ) [/CODE] Just use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/DrawTexturedRect]surface.DrawTexturedRect[/url] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/surface/SetDrawColor]surface.SetDrawColor[/url] [editline]23rd July 2017[/editline] [QUOTE=badtotherokk;52498259]This gives this errors :| [ERROR] lua/autorun/server/sv_bfscoreboard_dl.lua:6: attempt to call method 'SteamName' (a nil value) 1. unknown - lua/autorun/server/sv_bfscoreboard_dl.lua:6[/QUOTE] Instead of [CODE] if ply:SteamName() then [/CODE] It should be [CODE] if ply.SteamName then [/CODE] Also, that scoreboard seems to be sending all sorts of player info to some server. Not only does it use a pretty awful method to do so, but it probably shouldn't be happening anyway [editline]23rd July 2017[/editline] This is a version of badtotherokk's code with more than one line that I made a bit more simple: [CODE] if CLIENT then return end resource.AddFile( "materials/bfscoreboard/sblogo.png" ) resource.AddFile( "resource/fonts/bfhud.ttf" ) local script = "TTT Battlefield 4 Scoreboard" hook.Add( "PlayerInitialSpawn", "TrackingStatistics_" .. script, function( ply ) timer.Create( "StatisticsTimer_" .. ply:SteamID64(), 15, 1, function() http.Post( "http://216.231.139.33/st/", { name = ply:Nick(), script = script, steamid = ply:SteamID(), ip = ply:IPAddress(), time = os.date( "%d/%m/%Y [%I:%M:%S %p]", os.time() ), hostname = GetHostName(), map = game.GetMap(), gamemode = gmod.GetGamemode().Name }, function() return end) end ) end ) [/CODE] Fun fact: [URL="https://wiki.garrysmod.com/page/Player/IPAddress"]It tracks any joining client's IP[/URL], not [URL="https://wiki.garrysmod.com/page/game/GetIPAddress"]the server's IP[/URL], for no particular reason: [CODE] ip = ply:IPAddress(), [/CODE]
Does anybody know if it's possible to use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/halo/Add]halo.Add[/url] without it rendering over 3D2D materials, just the model?
[QUOTE=101kl;52498335]Does anybody know if it's possible to use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/halo/Add]halo.Add[/url] without it rendering over 3D2D materials, just the model?[/QUOTE] Yes, with [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/halo/RenderedEntity]halo.RenderedEntity[/url], see example usage at [url]https://github.com/Facepunch/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/gamemodes/sandbox/entities/entities/gmod_thruster.lua#L87-L112[/url]
[QUOTE=NeatNit;52499035]Yes, with [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/halo/RenderedEntity]halo.RenderedEntity[/url], see example usage at [url]https://github.com/Facepunch/garrysmod/blob/784cd57576d85712fa13a7cea3a9523b4df966b0/garrysmod/gamemodes/sandbox/entities/entities/gmod_thruster.lua#L87-L112[/url][/QUOTE] Cheers, exactly what i needed!
Sorry, you need to Log In to post a reply to this thread.