Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sepsis
Senior Member
Join Date: Jul 2011
Old 08-07-2011 , 13:32   Re: [EDIT] +e Regeneration Plugin (Excerpt from the idea)
Reply With Quote #1

This?

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <fun>
#define MAXPLAYERS 32
#define VERSION "1.0"
new gHPgTimes;
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], iNumiAll;
 
get_players(iPlayersiNum"a");
 for( new 
0iNumi++ )
 {
  
iAll iPlayers[i];
  
gHealTimes[iAll] = 0;
 }
}
public 
Ham_ObjectCaps(id)
{
 if( !
is_user_alive(id) )
  return 
PLUGIN_HANDLED;
 
 new 
nbut pev(idpev_button);
 new 
obut pev(idpev_oldbuttons);
 
 if( (
nbut IN_USE) && !(obut IN_USE) )
 {
  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));
  }
 }
 
 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
Sepsis is offline
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