Raised This Month: $ Target: $400
 0% 

set hp by cvar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-26-2009 , 11:13   set hp by cvar
Reply With Quote #1

how can i set hp by cvar ?
DoviuX is offline
Send a message via Skype™ to DoviuX
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-26-2009 , 11:16   Re: set hp by cvar
Reply With Quote #2

Code:
#include < amxmodx > #include < fun > new pCvarHealth; public plugin_init( ) {     pCvarHealth = register_cvar( "set_health_value", "100" ); } YourFunction( id ) {     set_user_health( id, get_pcvar_num( pCvarHealth ) ); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-26-2009 , 11:29   Re: set hp by cvar
Reply With Quote #3

ok thx

how can i set this hud message that all can see and how can i detect who buyed and write to the hud message ?

PHP Code:
                set_hudmessage225225225, -1.00.2926.012.0 );
                
show_hudmessage0"%s is unstoppable!" ); 
DoviuX is offline
Send a message via Skype™ to DoviuX
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 10-26-2009 , 12:23   Re: set hp by cvar
Reply With Quote #4

Quote:
Originally Posted by DoviuX View Post
ok thx

how can i set this hud message that all can see and how can i detect who buyed and write to the hud message ?

PHP Code:
                set_hudmessage225225225, -1.00.2926.012.0 );
                
show_hudmessage0"%s is unstoppable!" ); 
PHP Code:
 YourFunctionid ) {
    new 
name[32];
    
get_user_name(id,name,31);
    
set_user_healthidget_pcvar_numpCvarHealth ) );
    
set_hudmessage225225225, -1.00.2926.012.0 );
    
show_hudmessage0"%s is unstoppable!"name);

__________________

Last edited by <VeCo>; 10-26-2009 at 12:25.
<VeCo> is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 10-26-2009 , 17:34   Re: set hp by cvar
Reply With Quote #5

Or if you want that hp change instantly, you can use a concmd.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
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 17:42.


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