AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set hp by cvar (https://forums.alliedmods.net/showthread.php?t=107417)

DoviuX 10-26-2009 11:13

set hp by cvar
 
how can i set hp by cvar ?

Exolent[jNr] 10-26-2009 11:16

Re: set hp by cvar
 
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 ) ); }

DoviuX 10-26-2009 11:29

Re: set hp by cvar
 
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!" ); 


<VeCo> 10-26-2009 12:23

Re: set hp by cvar
 
Quote:

Originally Posted by DoviuX (Post 972636)
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);



Alucard^ 10-26-2009 17:34

Re: set hp by cvar
 
Or if you want that hp change instantly, you can use a concmd.


All times are GMT -4. The time now is 17:42.

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