So i was trying to redo grandwazir's BlindLuck plugin just to see if i could change it up for some pizzaz points for a friend and was wondering, because how he "restores" the hud settings to people that are no longer boomed, he turns client's "m_iHideHUD" to 0 (what if people naturally play with some hud elements missing?) - So i thought i'd try to get their hud settings before it's changed and store the value in a variable and that way it gets restored to clients original settings, so tell me please if this would work (since im not at a computer atm)...
outside any functions, alone as by itself:
PHP Code:
new OriginalHUD;
then, as soon as someone gets boomed:
PHP Code:
OriginalHUD = GetEntProp(client, Prop_Send, "m_iHideHUD");
when boomed, sets the client's hud to this:
PHP Code:
SetEntProp(client, Prop_Send, "m_iHideHUD", 64);
when client's done being biled over and its time to change settings back to normal:
PHP Code:
SetEntProp(client, Prop_Send, "m_iHideHUD", OriginalHUD);
Would this even work? Is it a normal way of doing it? Any way that it could be done much easier if this is such a nooby way of doing it?
-Edit: tested and tried different scenarios and it does work apparently