Raised This Month: $ Target: $400
 0% 

[EDIT] +e Regeneration Plugin (Excerpt from the idea)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 08-07-2011 , 13:49   Re: [EDIT] +e Regeneration Plugin (Excerpt from the idea)
Reply With Quote #1

don't know for the + sign seen only by teammates, someone more expirienced maybe can help you.

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>

#define MAXPLAYERS 32
#define VERSION "1.0"

new gHPgTimes;
new 
gHealTimes[MAXPLAYERS 1];

public 
plugin_init() 
{
    
register_plugin("+e Regeneration"VERSION"MaNiax");
 
    
RegisterHamHam_ObjectCaps "player""Forward_ObjectCaps" )
    
register_event("HLTV""eNewRound""a""1=0""2=0");
 
    
gHP register_cvar("th_heal""25");
    
gTimes register_cvar("th_healtimes""2");
}

public 
eNewRound(id)
{
    new 
iPlayers[MAXPLAYERS], iNumiAll;
    
get_players(iPlayersiNum"a");
    for( new 
0iNumi++ )
    {
        
iAll iPlayers[i];
        
gHealTimes[iAll] = 0;
    }
}

public 
Forward_ObjectCaps(id)
{
    if(!
is_user_alive(id))
        return;
 
    if( 
gHealTimes[id] < get_pcvar_num(gTimes) )
    {
        
set_user_health(idget_user_health(id) + get_pcvar_num(gHP));
        
client_print(idprint_chat"** You refreshed your health! (+%i HP)"get_pcvar_num(gHP));
        
gHealTimes[id]++;
    }
    else
        
client_print(idprint_chat"** You have already healed %i/%i Times!"gHealTimes[id], get_pcvar_num(gTimes));

OvidiuS is offline
Send a message via Skype™ to OvidiuS
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 03:30.


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