Ok im net messaging a hud so when the player dies a derma panel will show so:
[B]SERVER SIDE:[/B]
[CODE]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
[/CODE]
Yes its breaking bad ;)
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 :/
Probably me just being stupid :P
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: [b][url=http://gmodwiki.net/Lua/Libraries/net]Lua/Libraries/net[img]http://gmodwiki.net/favicon.ico[/img][/url][/b]
[QUOTE=EvacX;45659175]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: [b][url=http://gmodwiki.net/Lua/Libraries/net]Lua/Libraries/net[img]http://gmodwiki.net/favicon.ico[/img][/url][/b][/QUOTE]
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?
Sorry, you need to Log In to post a reply to this thread.