• GMOD Text on Screen
    1 replies, posted
I made a custom spawnpoint entity that locks in when you press E on it. When you do that, I want it to put some text on the screen, but I am not able to do that. I have tried multiple ways. This is the current code: [CODE]function ENT:Use(activator, ply) -- Whenever a player uses the entity self:SetMoveType(MOVETYPE_NONE) self:SetCollisionGroup(COLLISION_GROUP_PASSABLE_DOOR) if(self.Pushed == 0) then sound.Play("UI/buttonclick.wav", self:GetPos(), 150, 70) self.Pushed = 1 hook.Add( "HUDPaint", "HUDPaint_SpawnpointText", function() draw.SimpleText("Spawnpoint Locked", "DermaDefault", 200, 200, Color(255, 255, 255, 255), 0, 0) end ) hook.Call("HUDPaint_SpawnpointText") end end[/CODE]
ENT:Use() is Serverside. You'd have to use [url]http://wiki.garrysmod.com/page/Category:net[/url] to network from the server to the client, and run the HUDPaint there.
Sorry, you need to Log In to post a reply to this thread.