Raised This Month: $ Target: $400
 0% 

How to UNHide HUD ? [solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 06-18-2011 , 04:24   How to UNHide HUD ? [solved]
Reply With Quote #1

Hello.
I can hide players HUD well. But i didn't see anything about UnHiding hud. (may "reshow" my english isn't good)

Pls Help me ?
__________________
Working on mods..

Last edited by byetovice; 06-19-2011 at 05:10.
byetovice is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-18-2011 , 05:04   Re: How to UNHide HUD ?
Reply With Quote #2

That depends on how you "hide" the HUD.
__________________
fysiks is online now
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 06-18-2011 , 09:20   Re: How to UNHide HUD ?
Reply With Quote #3

PHP Code:
new iFlags
iFlags 
|= (1<<3)
iFlags |= (1<<4)
iFlags |= (1<<5)
iFlags |= (1<<6)

if(
iFlags)
{
message_begin(MSG_ONEget_user_msgid("HideWeapon"), _id)
write_byte(iFlags)
message_end()

__________________
Working on mods..
byetovice is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-18-2011 , 09:30   Re: How to UNHide HUD ?
Reply With Quote #4

Quote:
Originally Posted by byetovice View Post
PHP Code:
new iFlags
iFlags 
|= (1<<3)
iFlags |= (1<<4)
iFlags |= (1<<5)
iFlags |= (1<<6)
 
if(
iFlags)
{
message_begin(MSG_ONEget_user_msgid("HideWeapon"), _id)
write_byte(iFlags)
message_end()

mayby this way

PHP Code:
new iFlags
iFlags 
|= (1<<3)
iFlags |= (1<<4)
iFlags |= (1<<5)
iFlags |= (1<<6)

if(
iFlags)
{
message_begin(MSG_ONEget_user_msgid("ShowWeapon"), _id)
write_byte(iFlags)
message_end()

.Dare Devil. is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-18-2011 , 20:11   Re: How to UNHide HUD ?
Reply With Quote #5

Basically you are showing which flags you want hidden in the HideWeapon event.
Therefore, if you don't send any flags (0), then it doesn't have anything to hide.

Quote:
Originally Posted by .Dare Devil. View Post
mayby this way

PHP Code:
new iFlags
iFlags 
|= (1<<3)
iFlags |= (1<<4)
iFlags |= (1<<5)
iFlags |= (1<<6)

if(
iFlags)
{
message_begin(MSG_ONEget_user_msgid("ShowWeapon"), _id)
write_byte(iFlags)
message_end()

No. "HideWeapon" is an event that hides parts of the player's HUD.
http://wiki.amxmodx.org/Half-Life_1_Game_Events
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 06-19-2011 , 05:10   Re: How to UNHide HUD ?
Reply With Quote #6

Code:
new iFlags 
if(iFlags) 
{ 
message_begin(MSG_ONE, get_user_msgid("ShowWeapon"), _, id) 
write_byte(iFlags) 
message_end() 
}
O Solvet it , if(iFlags) is my problem. Thanks everybody.
__________________
Working on mods..
byetovice is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 06-18-2011 , 09:35   Re: How to UNHide HUD ?
Reply With Quote #7

haha
I tried remove iFlags |= (1<<X) codes. But it didn't work
__________________
Working on mods..
byetovice is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-18-2011 , 09:46   Re: How to UNHide HUD ?
Reply With Quote #8

iFlags is a bitsum, you can add (you already know how) or remove bits from it by using:
Code:
iFlags &= ~(1<<3)
In the above code, the (1<<3) bit is removed.
__________________
Hunter-Digital 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 23:30.


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