AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hiding Timer AND Money (https://forums.alliedmods.net/showthread.php?t=63060)

hlstriker 11-10-2007 20:14

Hiding Timer AND Money
 
With the code below it shows how to hide the Timer OR the Money.

PHP Code:

// Hides the timer
message_begin(MSG_ONEget_user_msgid("HideWeapon"), _id);
write_byte((1<<4));
message_end();

// Hides the money
message_begin(MSG_ONEget_user_msgid("HideWeapon"), _id);
write_byte((1<<5));
message_end(); 

Is there a way to hide the Timer AND Money at the same time?

Alka 11-10-2007 20:27

Re: Hiding Timer AND Money
 
Maybe...
Code:

message_begin(MSG_ONE, get_user_msgid("HideWeapon"), _, id);
write_byte((1<<4) | (1<<5));
message_end();


hlstriker 11-10-2007 20:47

Re: Hiding Timer AND Money
 
Very nice that worked :)

Thanks a ton, Alka!

CAMEL 12-09-2007 20:59

Re: Hiding Timer AND Money
 
Can u do a plugin for hide the money plz.. =$.. I don't know a lot of scripting =$

Arkshine 12-09-2007 21:37

Re: Hiding Timer AND Money
 
Quote:

Originally Posted by CAMEL (Post 561658)
Can u do a plugin for hide the money plz.. =$.. I don't know a lot of scripting =$

Try this. Not tested.

Code:
    #include <amxmodx>         #define REMOVE_CROSSHAIR  0     #define HIDE_MONEY ( 1 << 5 )         new         g_iMsg_HideWeapon,         g_iMsg_Crosshair;         public plugin_init()     {         register_plugin( "Hide Money", "1.0", "Arksine" );         register_event( "ResetHUD", "eResethud", "be" );                 g_iMsg_HideWeapon = get_user_msgid( "HideWeapon" );         g_iMsg_Crosshair  = get_user_msgid( "Crosshair"  );     }         public eResetHud( id )     {         if( !is_user_connected( id ) )             return;         static Float:flast_time;         new Float:fCur_time = get_gametime();           if( fCur_time == flast_time )             return;                     flast_time = fCur_time;             set_task( 0.1, "PostResethud", id );     }         public PostResethud( id )     {         if( !is_user_alive( id ) )             return;                 HideMoney( id );     }         public HideMoney( id )     {         message_begin( MSG_ONE, g_iMsg_HideWeapon, _, id );         write_byte( HIDE_MONEY );         message_end();         message_begin( MSG_ONE, g_iMsg_Crosshair, _, id );         write_byte( REMOVE_CROSSHAIR );         message_end();     }

CAMEL 12-10-2007 18:36

Re: Hiding Timer AND Money
 
Thanks a lot. Read the pm

CAMEL 12-13-2007 18:25

Re: Hiding Timer AND Money
 
I was without pc.. for a week .. I tried the plug and don't works =(.. But i don't know why.. cause it compile good but when i put it in my serv doesn't work =S.. Anyone can help? =S

Arkshine 12-13-2007 18:27

Re: Hiding Timer AND Money
 
Ok, I'm going to test it to find the problem. ;)

CAMEL 12-13-2007 18:32

Re: Hiding Timer AND Money
 
=).. Okz love u =P... Oh I read ur pm.. My native language isn't english .. I am from Argentina =).. Lol.. So my native language is spanish.. Oh lala (?)

Arkshine 12-13-2007 18:45

Re: Hiding Timer AND Money
 
1 Attachment(s)
Tested and it works. :)


All times are GMT -4. The time now is 01:16.

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