plugin regeneracion de vida
#1
hola busco un plugin de regeneracion de vida tengo este no si si alguien puede modificarlo
maximo de vida 100
a cada 20 segundos le da  10 de vida hasta llegar a los 100 , la idea que cada 20 segundos te vaya dando 10 de vida hata llegar a los 100 , si player le dispara a un player y le quita 40 de vida la idea que el plugins le suba la vida a cada 20 segundos 
la idea que solo sea para admin ADMIN_LEVEL_G


saludos 


Código PHP:
/* Copyright © 2009, ConnorMcLeod

Vampire is free software;
you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Vampire; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <screenfade_util>

#define PLUGIN "Vampire"
#define AUTHOR "ConnorMcLeod"
#define VERSION "1.2.0"

#define cs_get_user_team(%1) get_pdata_int(%1,114)

const m_LastHitGroup 75

new g_iMaxPlayers

new g_pCvarHpBonusg_pCvarHpBonusHsg_pCvarMaxHealthg_pCvarColorg_pCvarColorHsg_pCvarFadeTime

public plugin_init()
{
register_plugin(PLUGINVERSIONAUTHOR)

g_pCvarHpBonus register_cvar("amx_vampire_hp""10")
g_pCvarHpBonusHs register_cvar("amx_vampire_hp_hs""35")

g_pCvarMaxHealth register_cvar("amx_vampire_max_hp""150")
g_pCvarFadeTime register_cvar("amx_vampire_fadetime""4")

g_pCvarColor register_cvar("amx_vampire_color""000100255")
g_pCvarColorHs register_cvar("amx_vampire_color_hs""000255100")

RegisterHam(Ham_Killed"player""Player_Killed"1)

g_iMaxPlayers get_maxplayers()
}

public 
Player_Killed(iVictimiKiller)
{
if( 
iVictim == iKiller
|| !( <= iKiller <= g_iMaxPlayers)
|| !
is_user_alive(iKiller)
|| 
cs_get_user_team(iVictim) == cs_get_user_team(iKiller) )
{
return
}

new 
Float:flHealthFloat:flMaxHealth get_pcvar_float(g_pCvarMaxHealth)
pev(iKillerpev_healthflHealth)
new 
bHeadShot = (get_pdata_int(iVictimm_LastHitGroup) == HIT_HEAD)

if( 
flHealth flMaxHealth )
{
new 
Float:flNewHealth
new Float:flBonus get_pcvar_float(bHeadShot g_pCvarHpBonusHs g_pCvarHpBonus)

flNewHealth floatmin(flHealth flBonusflMaxHealth)
set_pev(iKillerpev_healthflNewHealth)

set_hudmessage(0255100, -1.00.1501.01.00.10.1, -1)
show_hudmessage(iKiller"Recibiste +%.0f hp"flNewHealth flHealth)
}

new 
iColor[3], Float:flTime get_pcvar_float(g_pCvarFadeTime)
iColor get_color(bHeadShot g_pCvarColorHs g_pCvarColor)
UTIL_ScreenFade(iKilleriColorflTimeflTime75)
}

get_color(pcvar)
{
new 
iColor[3], szColor[10]
get_pcvar_string(pcvarszColorcharsmax(szColor))
new 
str_to_num(szColor)

iColor[Red] = 1000000
%= 1000000
iColor
[Green] = 1000
iColor
[Blue] = 1000

return iColor
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
*/ 
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)