[CS 1.6 / CS:CZ] Zombie Plague Enterprise

pach2580
Сообщения: 48

Re: [CS 1.6 / CS:CZ] Zombie Plague Enterprise

Сообщение#41 » Пн фев 04, 2019 6:49 pm

Код: Выделить всё

public use_ability_one(id) {
	if (alive(id) && zombie_class(id, g_zc_heal) && zombie(id) && !nemesis(id)) {
		if(!g_cooldown[id]) {
			new Float:vecOrigin[3], Float:vecOrigin2[3], Float:fDistance
		
			
			pev(id, pev_origin, vecOrigin)
			static i; while((i = engfunc(EngFunc_FindEntityInSphere, i, vecOrigin, skill_raduis)))
			{
				if(!pev_valid(i) || !alive(i) || nemesis(i) || !zombie(i)) continue
				
				pev(i, pev_origin, vecOrigin2)
				fDistance = get_distance_f(vecOrigin, vecOrigin2)
				if(fDistance > skill_raduis) continue
				
				/*new newhealth = floatround(get_user_health(i) * skill_heal_health + get_user_health(i))
				SET_USER_HEALTH(i, newhealth < zmh(i)? newhealth : zmh(i))
				SET_USER_HEALTH(i, float(min(get_user_health(i) + get_user_health(i) * skill_heal_health), zmh(i)))
				set_pev(i, pev_health, float(min(pev(i, pev_health) + (pev(i, pev_health) * skill_heal_health), zmh(i))))*/
				
				SET_USER_HEALTH(i, GET_USER_HEALTH(i) + 300.0)
			}
			
			SpriteHealHealth(vecOrigin, g_cache_spr, 24)
			
			new sound[64]
			ArrayGetString(g_ZC_AHealSound, random_num(0, ArraySize(g_ZC_AHealSound) - 1), sound, charsmax(sound))
			emit_sound(id, CHAN_VOICE, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
			
			g_cooldown[id] = true
			g_time[id] = get_gametime()
			g_cooldown_time[id] = floatround(skill_timewait)
		}
	}
}
может подскажете, что здесь не так, почему то неправильно работает=\