This?
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <fun>
#define MAXPLAYERS 32
#define VERSION "1.0"
new gHP, gTimes;
new gHealTimes[MAXPLAYERS + 1];
public plugin_init()
{
register_plugin("+e Regeneration", VERSION, "MaNiax");
register_forward(FM_PlayerPreThink, "Ham_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], iNum, iAll;
get_players(iPlayers, iNum, "a");
for( new i = 0; i < iNum; i++ )
{
iAll = iPlayers[i];
gHealTimes[iAll] = 0;
}
}
public Ham_ObjectCaps(id)
{
if( !is_user_alive(id) )
return PLUGIN_HANDLED;
new nbut = pev(id, pev_button);
new obut = pev(id, pev_oldbuttons);
if( (nbut & IN_USE) && !(obut & IN_USE) )
{
if( gHealTimes[id] < get_pcvar_num(gTimes) )
{
set_user_health(id, get_user_health(id) + get_pcvar_num(gHP));
client_print(id, print_chat, "** You refreshed your health! (+%i HP)", get_pcvar_num(gHP));
gHealTimes[id]++;
}
else
{
client_print(id, print_chat, "** You have already healed %i/%i Times!", gHealTimes[id], get_pcvar_num(gTimes));
}
}
return PLUGIN_CONTINUE;
}
Thnx but,
I would like to.The ability to grant health , This ability at the start of the game 1 or 2 players will be given randomly and next to the
name [+] sign will. Yet
[+] this the sign will see
teammate only