Im not sure with this net message?

Ok im net messaging a hud so when the player dies a derma panel will show so:

SERVER SIDE:


function GM:PlayerDeath (ply, inflictor, attacker)
	if ply == attacker then
		return end

	elseif ply:Team() == 1 then
		for k, v in pairs (player.GetAll() ) do
		PrintMessage( 1, ply:Nick() .. " has been caught by a fellow DEA Agent!" ) 
		end
	end

	elseif ply:Team() == 2 then
		for k, v in pairs (player.GetAll() ) do
		v:PrintMessage( 1, ply:Nick() .. " was KIA at " .. ply:GetPos() )
		end
	end

	net.Receive("ShowHUD"), hook.Add("HUDPaint", "ShowOnDeath", function()
	//Configure. Draw HUD when the player dies!
	end)

end


Yes its breaking bad :wink:

Line 6 maybe should have v:Printmessage?
Idk, I just saw how you had it for elseif and thought you might have just missed it accidentally :confused:
Probably me just being stupid :stuck_out_tongue:

If I’m not mistaken server side should be net.Send and client side should be net.Receive

So you need the server to send a message to the client telling them to open a panel, yet you have the receiving code on the server? And why are you trying to use a clientside hook serverside?

There’s a tutorial on this page: **[Lua/Libraries/net

http://gmodwiki.net/favicon.ico](http://gmodwiki.net/Lua/Libraries/net)**

ah ok, I was a little confused with sending what where>_<

[editline]11th August 2014[/editline]

Ok so I send the message to the client. But do I send the server side function? And then how can I create a derma panel if it receives that function and runs?