Raised This Month: $12 Target: $400
 3% 

How to use GetEntProp correctly?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
QOOOOOOOOQ
Senior Member
Join Date: Dec 2012
Old 02-11-2013 , 00:28   How to use GetEntProp correctly?
Reply With Quote #1

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(clientProp_Send"m_iHideHUD"); 
when boomed, sets the client's hud to this:
PHP Code:
SetEntProp(clientProp_Send"m_iHideHUD"64); 
when client's done being biled over and its time to change settings back to normal:
PHP Code:
SetEntProp(clientProp_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

Last edited by QOOOOOOOOQ; 02-11-2013 at 04:21.
QOOOOOOOOQ is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 02-11-2013 , 05:54   Re: How to use GetEntProp correctly?
Reply With Quote #2

Just so you know, SMLIB has HideHud stocks and defines (in smlib/clients.inc).
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 02-11-2013 , 05:59   Re: How to use GetEntProp correctly?
Reply With Quote #3

You could simply blind the player.
Skyy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode