Descriere: scrii /heal si incepi sa te regenerezi + o lumina albastra (ca pe mnx,scuze de reclama)
Descarcare:
Code:// Aici in ghilimele pune tagu mesajelor
#define TAG "[My Tag"]
#include <amxmodx>
#include <fun>
#define PLUGIN "Medic !!"
#define VERSION "1.0"
#define AUTHOR "LordOfNothing"
new healcvar;
new healpertime;
new maxhp;
new htime;
new bool:healthstart[33];
#define RRR 0
#define GGG 0
#define BBB 255
#define AAA 50
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Call the command ! //
register_clcmd("medic","HookMedic");
register_clcmd("say /heal","HookMedic");
register_clcmd("say_team /heal","HookMedic");
register_clcmd( "say", "Func_Say" );
register_clcmd( "say_team", "Func_Say" );
// Cvars //
healcvar = register_cvar("heal_hpstart","25");
healpertime = register_cvar("heal_givehp","25");
maxhp = register_cvar("heal_maxhp","100");
htime = register_cvar("heal_time","10.0");
}
public client_putinserver(id) healthstart[id] = false;
public health_scan(id)
{
if(get_user_health(id) < get_pcvar_num(maxhp) && healthstart[id])
{
set_user_health(id, get_user_health(id) + get_pcvar_num(healpertime));
CreateFade( id, RRR, GGG, BBB, AAA );
set_task(get_pcvar_float(htime), "health_scan", id);
client_print(id, print_chat, "%s Heal in progress !",TAG);
}
else
{
healthstart[id] = false
remove_task(id);
client_print(id, print_chat, "%s Heal finished !",TAG);
}
}
public HookMedic(id)
{
if(get_user_health(id) < get_pcvar_num(healcvar))
{
healthstart[id] = true;
client_print(id, print_chat, "%s Your heal is in progress !",TAG);
set_task(get_pcvar_float(htime), "health_scan", id);
return 1;
}
else
{
client_print(id, print_chat, "%s You have to many health !",TAG);
return 1;
}
return 0;
}
public Func_Say( id )
{
new szSaid[ 192 ];
read_args( szSaid, sizeof( szSaid ) -1 );
remove_quotes( szSaid );
if( contain( szSaid, "heal" ) != -1 )
{
HookMedic(id);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
stock CreateFade( id, iRed, iGreen, iBlue, iAlpha )
{
message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0, 0, 0 }, id );
write_short( 5 << 10 );
write_short( 5 << 10 );
write_short( 5 << 12 );
write_byte( iRed );
write_byte( iGreen );
write_byte( iBlue );
write_byte( iAlpha );
message_end( );
}
Nume: HEAL
Versiune: 1.0
Link oficial: ExtreamCS
Instalare:
1. Fisierul heal.sma il puneti in addons/amxmodx/scripting
2. Fisierul heal.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Code:heal.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
- heal_givehp 25 - cat hp sati dea !
heal_starthp 25 - de la cat hp sa inceapa regenerare (dupa ce ai scris /heal)
heal_time 10.0 - din cate in cate secunde sati dea HP
heal_maxhp 100 - pan la cat hp sa iti regenereze
Comenzi publice (se tasteaza in joc prin apasarea tastei
Y):
- /heal - incepe vindecarea
Imagini