Raised This Month: $ Target: $400
 0% 

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


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

Hey guys , Came to my mind an idea

This plugin I would like to add a few features, e.g. The ability to grant health , at the start of the game two players will be given randomly and next to the name [+] sign will. But, This the sign [+] Only will see teammate.

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"HookUse");
 
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 
HookUse(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;

Sepsis 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 03:30.


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