Raised This Month: $ Target: $400
 0% 

how do add sprite?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GoOleM
New Member
Join Date: Jun 2011
Old 06-20-2011 , 10:37   how do add sprite?
Reply With Quote #1

Help please, how to add a sprite to play this plugin?
PHP Code:
/* Plugin generated by AMXX-Studio */ 

#include <amxmodx> 
#include <fakemeta> 
#include <zombieplague> 

#define PLUGIN "Healing skill" 
#define VERSION "1.0" 
#define AUTHOR "teo" 

new cvar_activecvar_timecvar_amount 
new Float:user_time[32
new 
bool:can_heal[32

public 
plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
    
cvar_active register_cvar("zp_zombie_heal_enable""1"
    
cvar_time register_cvar("zp_zombie_time""5.0"
    
cvar_amount register_cvar("zp_zombie_heal_amount","200.0"
    
register_forward(FM_PlayerPreThink"fm_pthink"


public 
plugin_precache() 

    
precache_sound("zombie_plague/zombi_heal.wav"


public 
fm_pthink(id

    if (!
get_cvar_num("zp_on")) 
        return 
FMRES_IGNORED 
    
if ( zp_get_user_nemesis(id) || zp_get_user_survivor(id)) 
        return 
FMRES_IGNORED 
    
if (!zp_get_user_zombie(id)) 
        return 
FMRES_IGNORED 
    
if (!is_user_alive(id)) 
        return 
FMRES_IGNORED 
    
if (!get_pcvar_num(cvar_active)) 
        return 
FMRES_IGNORED 
    
new button pev(idpev_button
    if (
button IN_MOVELEFT || button IN_MOVERIGHT || button IN_FORWARD || button IN_BACK || button IN_JUMP
        
can_heal[id] = false 
    
if (!(button IN_MOVELEFT || button IN_MOVERIGHT || button IN_FORWARD || button IN_BACK || button IN_JUMP)) 
    { 
        if (!
can_heal[id]) 
        { 
            
can_heal[id] = true 
            user_time
[id] = get_gametime() 
        } 
        if (
can_heal[id]) 
        { 
            new 
Float:current_time get_gametime() 
            if (
current_time user_time[id] >= get_pcvar_float(cvar_time)) 
            { 
                
rehealth(id
                
can_heal[id] = false 
            

        } 
    } 
    return 
FMRES_HANDLED 


public 
rehealth(id

    new 
health pev(idpev_health
    if (
health zp_get_zombie_maxhealth(id)) 
    { 
        if (
health get_pcvar_float(cvar_amount) < zp_get_zombie_maxhealth(id)) 
        { 
            
set_pev(idpev_healthpev(idpev_health) + get_pcvar_float(cvar_amount)) 
            
emit_sound(idCHAN_BODY"zombie_plague/zombi_heal.wav"1ATTN_NORM0PITCH_NORM
        } 
        else 
        { 
            
set_pev(idpev_healthfloat(zp_get_zombie_maxhealth(id))) 
            
emit_sound(idCHAN_BODY"zombie_plague/zombi_heal.wav"1ATTN_NORM0PITCH_NORM
        } 
    } 

GoOleM is offline
 



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 23:32.


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