plugin para recuperar vida ?
#1
hola necesito un aporte com un plugin de recuperacion de vida automatica mente en 1 a 1 hasta 100% de la vida gracias Sonrisa
Responder
#2
Descargar sprite

Código PHP:
#include < amxmodx >
#include < fun >
#include < fakemeta >

new PLUGIN[ ] = "HP Regeneration";
new 
VERSION[ ] = "1.0";
new 
AUTHOR[ ] = "Chema";

const 
MAX_HEALTH 100;
const 
MIN_HEALTH 1;

const 
REGENERATE_HEALTH 1// CANTIDAD DE VIDA QUE REGENERA POR SEGUNDO.
const TASK_HEALTH 1337;

new 
g_iEffect;

public 
plugin_precache( ) {
    
    
g_iEffect precache_model"sprites/BRUTAL-GAMERS/health.spr" );
}

public 
plugin_init( ) {

    
register_pluginPLUGINVERSIONAUTHOR );

    
register_event"Damage""event__Damage""be""2>0" 
}

public 
event__Damageid ) {
    
    if( !
is_user_aliveid ) )
        return 
PLUGIN_CONTINUE;
    
    if( 
pevidpev_health ) < 100 )
        
set_task1.0"rerenerate__Health"id__"b" );
    else
        
remove_taskid );
    
    return 
PLUGIN_CONTINUE
}

public 
rerenerate__Healthid ) {
    
    if( !
is_user_aliveid ) )
        return 
PLUGIN_CONTINUE
    
    
    set_user_health
idclamp( ( get_user_healthid ) + REGENERATE_HEALTH ), 0MAX_HEALTH ) );
    
    
regenerate__Effectid );
    
    return 
PLUGIN_CONTINUE;
}

regenerate__Effectid ) {
    
    new 
xyz;
    
    new 
iOrigin[3]

    
get_user_originidiOrigin );

    
message_beginMSG_PVSSVC_TEMPENTITYiOrigin );
    
write_byteTE_PROJECTILE )
    
write_coordiOrigin[x] + random_num( -1010 ) );
    
write_coordiOrigin[y] + random_num( -1010 ) );
    
write_coordiOrigin[z] + random_num030 ) );
    
write_coord);
    
write_coord);
    
write_coord15 );
    
write_shortg_iEffect );
    
write_byte);
    
write_byteid );
    
message_end( );


Saludos. Crab
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)