If F1 is open then it shuld add text above your head and give you more HP.

Title says alot.

I want to make something that if the F1 (and F2,F3 and F4) is open it would add some text above your head like: Player is reading X menu. You cannot kill him. And it would also give him 999999 HP so he wouldent die if somebody shoot at him.

How would i do something like this?
Also is it even possible to check if the person is watching the menu.

Thank you very much!

Can be abused very easily. I don’t suggest doing this at all.

I agree, especially if this is going to be for a gamemode. Player 1 attacks Player 2. Player 2 pushes F1 and gets health.

How about it simply makes you translucent and things go right through you? Then you wouldn’t have to worry about damage or griefers.

Wow. I didten even think about that.

Yea probably a bad idea. Forget i asked.

Well we can still help you make something (preferably a better alternative). Any other ideas? Maybe so if you have moved in the last 10 seconds then you can’t do it or something?

Well… it depends.

If there in a menu then they cant move or fire. I would suggest enabling god mode, Then do a check every couple of seconds to see if there NOT IN THE MENU, If there not in the menu, then ungod them.

That’s a good idea, maybe put them in a spectate or help team, while they’re reading it. :v:

Or if it’s a DM sort of gamemode. Make it so they can only use the menu when dead or in-between rounds.

Sort of like:

– serverside
function OpenMenu(ply)
if ply:Alive() then
umsg.Start(“Open_Menu”, ply)
ply:ChatPrint(“You can only open the menu if you’re dead!”)
concommand.Add(“open_menu”, OpenMenu)

– clientside
local function Open_Menu(um)
local Derma_Frame = vgui.Create(“DFrame”)
– etc…
usermessage.Hook(“Open_Menu”, Open_Menu)

So the client will ask the server if it’s allowed to open the menu, and the function on the client is local so they couldn’t call it directly.

(Unless they used the debug library, but 99% of people don’t know how to do that)