Dm sunucumuz da 255 sınırı için bir eklenti yaptık fakat sunucu da ki can ne olursa olsun 255 üstüne her daim çıkıyor hatta 1000 üstü dahi çıkıyor yardımcı olur iseniz sevinirim.
Eklentiyi ekte paylaşıyorum
Kod:
#include <amxmodx>
#include <reapi>
new bool:aktif,bool:hudbilgi,Float:maxcan,Float:odul,Float:hsodul;
public plugin_init() {
register_plugin("HP Bonus","1.2","Persians Fixed");
RegisterHookChain(RG_CBasePlayer_Killed,"PlayerKilled",.post=true);
bind_pcvar_num(create_cvar("hpbonus_aktif","1",_,_,true,0.0,true,1.0),aktif);
bind_pcvar_num(create_cvar("hpbonus_hudbilgi","1",_,_,true,0.0,true,1.0),hudbilgi);
bind_pcvar_float(create_cvar("hpbonus_maxhp","255"),maxcan);
bind_pcvar_float(create_cvar("hpbonus_odul","10"),odul);
bind_pcvar_float(create_cvar("hpbonus_hsodul","15"),hsodul);
}
public PlayerKilled(const victim,attacker,iGib) {
if(is_user_connected(victim) && is_user_connected(attacker) && victim != attacker)
{
new bool:hs = get_member(victim,m_bHeadshotKilled);
if(get_entvar(attacker, var_health) <= maxcan)
{
if(hs) {
set_entvar(attacker, var_health, Float: get_entvar(attacker, var_health) + hsodul );
}
else {
set_entvar(attacker, var_health, Float: get_entvar(attacker, var_health) + odul);
}
if(hudbilgi) {
set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1);
show_hudmessage(attacker,"+%d HP",hs ? floatround(hsodul,floatround_tozero) : floatround(odul,floatround_tozero));
}
}
else {
set_entvar(attacker,var_health, maxcan);
}
message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},attacker);
write_short(1<<10);
write_short(1<<10);
write_short(0x0000);
write_byte(0);
write_byte(0);
write_byte(200);
write_byte(75);
message_end();
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/)


