AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Not displaying message (https://forums.alliedmods.net/showthread.php?t=128805)

asd13 06-05-2010 15:36

Not displaying message
 
Why isint it showing message? :O

PHP Code:

#include < amxmodx >

public plugin_init( ) {
    
register_event"DeathMsg""PlayerKilled""a""1>0" );
}
public 
PlayerKilled( ) {
    new 
iKiller read_data);
    
    if( 
get_user_healthiKiller ) > 100 )
        
client_printiKillerprint_chat"Some Text" );



Bugsy 06-05-2010 15:39

Re: Not displaying message
 
Double check your health check.

asd13 06-05-2010 16:37

Re: Not displaying message
 
A little mistake. :D

This is what i wanted to do actually :)
PHP Code:

#include < amxmodx >
#include < fun >

const VipFlags ADMIN_LEVEL_H;

new 
iHp_add;
new 
cHp_AddcHp_Hs;

public 
plugin_init( ) {
    
register_event"DeathMsg""PlayerKilled""a""1>0" );
    
    
cHp_Add    register_cvar"amx_hp_add",    "15" );
    
cHp_Hs    register_cvar"amx_hp_hs",    "30" );
}

public 
PlayerKilled( ) {
    new 
iKiller read_data);
    
    if( 
read_data) )
        
iHp_add get_pcvar_num cHp_Hs );
    else
        
iHp_add get_pcvar_num cHp_Add );
    
    if( 
get_user_healthiKiller ) < 100 ) {
        
set_user_healthiKillerget_user_healthiKiller ) + iHp_add );
        
        if( 
get_user_healthiKiller ) > 100 )
            
set_user_healthiKiller100 );
        
        
set_hudmessage02550, -1.00.1501.01.00.10.1, -);
        
show_hudmessageiKiller"Healed +%d hp"iHp_add );
    }




All times are GMT -4. The time now is 05:18.

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