- Article
- 2018-03-24
1) После инклюдов пишем следующие:
#define TASK_FBURN 100
#define ID_FBURN ( taskid - TASK_FBURN )
#define MAX_CLIENTS 32
new bool:g_fRoundEnd
#define FIRE_DURATION 6
#define FIRE_DAMAGE 25
2) Ниже добавляем это:
new g_flameSpr, g_smokeSpr, g_burning_duration[ MAX_CLIENTS + 1 ]
3) В public plugin_precache добавляем:
g_flameSpr = precache_model( "sprites/flame.spr" );
g_smokeSpr = precache_model( "sprites/black_smoke3.spr" );
4) Находим public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
Находим что-то типо этого
if (weapon == CSW_KNIFE && g_KNIFE4[attacker])
{
SetHamParamFloat(4, damage * get_pcvar_float(cvar_dmgmult_vip))
new Float:vec[3];
new Float:oldvelo[3];
pev(victim, pev_velocity, oldvelo);
create_velocity_vector(victim , attacker , vec);
vec[0] += oldvelo[0];
vec[1] += oldvelo[1];
set_pev(victim, pev_velocity, vec);
ПОСЛЕ ЭТИХ СТРОЧЕК ПИШЕМ ЭТО
if( !task_exists( victim + TASK_FBURN ) )
{
g_burning_duration[ victim ] += FIRE_DURATION * 5
set_task( 0.1, "CTask__BurningFlame", victim + TASK_FBURN, _, _, "b" )
}
Получится так
if (weapon == CSW_KNIFE && g_KNIFE4[attacker])
{
SetHamParamFloat(4, damage * get_pcvar_float(cvar_dmgmult_vip))
new Float:vec[3];
new Float:oldvelo[3];
pev(victim, pev_velocity, oldvelo);
create_velocity_vector(victim , attacker , vec);
vec[0] += oldvelo[0];
vec[1] += oldvelo[1];
set_pev(victim, pev_velocity, vec);
if( !task_exists( victim + TASK_FBURN ) )
{
g_burning_duration[ victim ] += FIRE_DURATION * 5
set_task( 0.1, "CTask__BurningFlame", victim + TASK_FBURN, _, _, "b" )
}
5) Ну и где-то в конце вставляем это:
public CTask__BurningFlame( taskid )
{
// Get player origin and flags
static origin[3], flags
get_user_origin(ID_FBURN, origin)
flags = pev(ID_FBURN, pev_flags)
// Madness mode - in water - burning stopped
if ((flags & FL_INWATER) || g_burning_duration[ID_FBURN] < 1 || g_fRoundEnd || !is_user_alive(ID_FBURN))
{
// Smoke sprite
message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
write_byte(TE_SMOKE) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]-50) // z
write_short(g_smokeSpr) // sprite
write_byte(random_num(15, 20)) // scale
write_byte(random_num(10, 20)) // framerate
message_end()
// Task not needed anymore
remove_task(taskid)
return
}
// Get player's health
static health
health = pev(ID_FBURN, pev_health)
// Take damage from the fire
if (health - FIRE_DAMAGE > 0)
fm_set_user_health(ID_FBURN, health - FIRE_DAMAGE)
// Flame sprite
message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
write_byte(TE_SPRITE) // TE id
write_coord(origin[0]+random_num(-5, 5)) // x
write_coord(origin[1]+random_num(-5, 5)) // y
write_coord(origin[2]+random_num(-10, 10)) // z
write_short(g_flameSpr) // sprite
write_byte(random_num(5, 10)) // scale
write_byte(200) // brightness
message_end()
g_burning_duration[ID_FBURN]--
}
P.S Вот исходник ножей со способностями поджёг, заморозка, антидот, пользуйтесь XD
%25
Discount on all purchases
builds until September 16, 2024
Especially for you - Гость

Buy an assembly

[CS 1.6] Zombie Model - Mega Scorpion
there is no arms model for this zombie , you , we can provide you a modeller and he canmake it for you for money

[CS 1.6] Zombie Model - Mega Scorpion
Is there a model of the arms?

[CSO] Обновление игры Сounter Strike Online от (25.04.2019)
enjoy it brother

[CSO] Обновление игры Сounter Strike Online от (25.04.2019)
looks very nice, downloadlink thanks!

[Модуль] NetBufExtender (NBEX) для CS 1.6
if u have discord or vk , please share it so we can help you about this problem !
ReHLDS (Reverse-engineered) - this is a new step forward that gives a second wind to our servers. ReHLDS works 2 times faster than HLDS.
AMXModX is a Metamod add-on that allows you to create new modifications for Half-Life in the Pawn language
Reunion is a continuation of Dproto for ReHLDS. This is a metamod plugin that allows you to log into the 47/48 Non-Steam server.
Revoice is a Metamod plugin that allows voice chat between non-steam and steam clients.
The new Metamod-r contains a huge number of performance optimizations and much cleaner code. The kernel was written using a JIT compiler.
Ultimate Unprecacher is a plugin for MetaMod, it works on the principle of disabling unnecessary resources on your server, thereby you can free up space for resources for your plugins, using this module you can get rid of error 512!
ReAuthCheck - this is a Metamod plugin that checks your players for validity, with this module for REHLDS you can protect your server from bots that constantly spam ads or simply clog up a slot on the server!
NetBufExtender or NBEX - This is a metamod plugin that expands the пїЅInternet bufferпїЅ: server and client buffers (not 100% guaranteed). Expands up to 64 kb. This means that players are less likely to be kicked with the error "Reliable channel overflowed"".
UINO пїЅ metamod plugin that allows you to remove unnecessary fields from userinfo(setinfo) when the engine passes it to other players on the server. This measure reduces the amount of data transferred and slightly reduces the chance of being kicked with "Reliable channel overflowed".