AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to UNHide HUD ? [solved] (https://forums.alliedmods.net/showthread.php?t=159498)

byetovice 06-18-2011 04:24

How to UNHide HUD ? [solved]
 
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 ?

fysiks 06-18-2011 05:04

Re: How to UNHide HUD ?
 
That depends on how you "hide" the HUD.

byetovice 06-18-2011 09:20

Re: How to UNHide HUD ?
 
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()



.Dare Devil. 06-18-2011 09:30

Re: How to UNHide HUD ?
 
Quote:

Originally Posted by byetovice (Post 1490726)
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()



byetovice 06-18-2011 09:35

Re: How to UNHide HUD ?
 
haha :D
I tried remove iFlags |= (1<<X) codes. But it didn't work

Hunter-Digital 06-18-2011 09:46

Re: How to UNHide HUD ?
 
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.

Exolent[jNr] 06-18-2011 20:11

Re: How to UNHide HUD ?
 
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. (Post 1490731)
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

byetovice 06-19-2011 05:10

Re: How to UNHide HUD ?
 
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.


All times are GMT -4. The time now is 23:30.

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