Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Ko phải trong chế độ zombie mà khi human vs human ấy.khi bị bắn mỗi thì màn hình nháy đỏ cái, trông rất thực và hay. Ai bik bảo e cái
ọc.mọi thứ trong plugin nó đều liên quan đến nhau.nó có tách rời đâu mà share riêng.Sếp tùng share em cái code tiến hóa đi ==!
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
// Non-player damage or self damage
if (victim == attacker)
return HAM_IGNORED;
// Fix bug player not connect
if (!is_user_connected(victim) || !is_user_connected(attacker))
return HAM_IGNORED;
// Remove Damage when Freetime
if (g_newround || g_endround)
return HAM_SUPERCEDE;
// attacker is zombie
if (g_zombie[attacker] && !g_zombie[victim])
{
// Fix Bug zombie has weapons # knife
if (get_user_weapon(attacker) != CSW_KNIFE) return HAM_SUPERCEDE;
// infection
new human_alive = GetTotalPlayer(4, 1)
if (human_alive>1)
{
zombie_infection_human(attacker, victim)
return HAM_SUPERCEDE;
}
else
{
SetHamParamFloat(4, float(get_user_health(victim)*2))
return HAM_IGNORED
}
}
// attacker is human
else if (!g_zombie[attacker] && g_zombie[victim])
{
// remove restore health of zombie
g_restore_health[victim] = 0
// he xdamage
if ( (damage_type & DMG_HEGRENADE) && !g_zombie[attacker] )
{
new Float: hedmg = get_pcvar_float(cvar_hedamage)
if (damage < hedmg) damage += hedmg
}
// X Damage
else if (g_level[attacker])
{
new Float: xdmg = str_to_float(XDAMAGE[g_level[attacker]])
damage *= xdmg
}
SetHamParamFloat(4, damage)
return HAM_IGNORED
}
// fix bug
else return HAM_SUPERCEDE;
return HAM_IGNORED
}
zombie_infection_human(attacker, victim)
{
// show Msg Death
SendDeathMsg(attacker, victim)
FixDeadAttrib(victim)
// update frags of attacker and deaths of victim
UpdateFrags(attacker, 1)
UpdateDeaths(victim, 1)
// update evolution of zombie attacker
new xlevel, evo_up
if (g_hero[victim]) xlevel = 4
else xlevel = 1
if (g_level[attacker]==1) evo_up = xlevel*3
else if (g_level[attacker]==2) evo_up = xlevel*2
UpdateEvolution(attacker, evo_up)
// make zombie infection
g_evolution[victim] = 0
g_level[victim] = 1
g_start_health[victim] = get_user_health(attacker)*1/2
g_star_armor[victim] = get_user_armor(attacker)*1/2
// make zombie
g_zombieclass[victim] = random(class_count)
make_zombie(victim)
// show menu class zombie
show_menu_class_zombie(victim)
// remove glow of victim
fm_set_rendering(victim)
// play sound human death
new sound[64], sex
sex = nst_get_user_sex(victim)
if (sex == 2) ArrayGetString(sound_female_death, random(ArraySize(sound_female_death)), sound, charsmax(sound))
else ArrayGetString(sound_human_death, random(ArraySize(sound_human_death)), sound, charsmax(sound))
PlayEmitSound(victim, CHAN_VOICE, sound)
// play sound zombie coming
ArrayGetString(sound_zombie_coming, random(ArraySize(sound_zombie_coming)), sound, charsmax(sound))
PlaySound(0, sound)
// Post user infect forward
ExecuteForward(g_fwUserInfected, g_fwDummyResult, victim, attacker)
//client_print(attacker, print_chat, "L[%i] E[%i]", g_level[attacker], g_evolution[attacker])
//client_print(victim, print_chat, "DA[%i] DV[%i]", get_user_health(attacker), g_start_health[victim])
//client_print(victim, print_chat, "AA[%i] AV[%i]", get_user_armor(attacker), g_star_armor[victim])
}
UpdateEvolution(id, num)
{
if (!num || !g_zombie[id]) return;
// update Evolution of zombie
g_evolution[id] += num
if (g_evolution[id] > MAX_EVOLUTION) g_evolution[id] = MAX_EVOLUTION
// update level of zombie
new evolution_zb = g_evolution[id] % 10
new levelup = (g_evolution[id]-evolution_zb)/10
if (levelup && g_level[id]<MAX_LEVEL_ZOMBIE)
{
// reset zombie die
g_zombie_die[id] = 0
// update level
UpdateLevelZombie(id, levelup)
// set health & armor
UpdateHealthZombie(id)
// create effect
EffectLevelUp(id)
// play sound evolution
new sound_ev[64]
ArrayGetString(zombie_sound_evolution, g_zombieclass[id], sound_ev, charsmax(sound_ev))
PlayEmitSound(id, CHAN_VOICE, sound_ev)
}
// max level zombie
g_evolution[id] = evolution_zb
if (g_level[id] >= MAX_LEVEL_ZOMBIE) g_evolution[id] = MAX_EVOLUTION
// show Evolution
//show_level(id)
//client_print(id, print_chat, "E[%i]", g_evolution[id])
}
UpdateHealthZombie(id)
{
if (!g_zombie[id]) return;
// set value
new health, armor
if (g_level[id]==2)
{
health = ZB_LV2_HEALTH
armor = ZB_LV2_ARMOR
}
else if (g_level[id]==3)
{
health = ZB_LV3_HEALTH
armor = ZB_LV3_ARMOR
}
else
{
health = g_start_health[id]
armor = g_star_armor[id]
}
// zombie has 1/2 health if die
if ((g_level[id]==1 && g_zombie_die[id]==1) || (g_level[id]>1 && g_zombie_die[id]))
{
health = health/2
}
// check value
health = max(MIN_HEALTH_ZOMBIE, health)
armor = max(MIN_ARMOR_ZOMBIE, armor)
// set again start value
g_start_health[id] = health
g_star_armor[id] = armor
// give health
fm_set_user_health(id, health)
fm_set_user_armor(id, armor)
}
. Còn về cái màn hình nhấp nháy đỏ thì bạn nên dùng screenfade, đó là một hàm message, set vài thông số là xongHì, thì mỗi người đều phải giữ bí quyết về plugin của mình mà. Nhiều người nó không thích Sơn tùng vì ko share sma nhưng là coder tôi cũng thông cảm với Sơn tùng. Còn về cái màn hình nhấp nháy đỏ thì bạn nên dùng screenfade, đó là một hàm message, set vài thông số là xong
---------- Post added at 07:33 ---------- Previous post was at 07:31 ----------
Làm hòm tiếp tế để nhặt được súng CSO NST thì tôi không thể làm được (vì tôi có biết thuật toán và id súng trong nst weapon đâu), nhưng nếu là hòm tiếp tế thông thường hoặc kiêm tiếp tế cả g4u weapon thì làm được





Tớ đang cần cái plugin để xác chết không nằm xuyên tường,
trước có thấy rồi, nhưng bây giờ tìm ko đc,
có ai biết ko?![]()
Có 1 cái plugin chống cho xác chết không xuyên tường thôi chứ không như CSS được.