Инструкция пользовательский партикл.
Нам понадобятся:
контент-хост.
http://wiki.myarena....г_ручной_способ
Плагин для загрузки файлов (Все txt и pcf файлы необходимо прописать в файл downloads.ini включая пути до них).
Плагин которым будем активировать частицы. (Пример)
#include <sourcemod> #include <sdktools> #pragma semicolon 1 #define PARTICLE_SCREEN_EFFECT_1 "old_school_01" #define PARTICLE_SCREEN_EFFECT_2 "old_school_02" #define PARTICLE_SCREEN_EFFECT_3 "old_school_03" #define PARTICLE_SCREEN_EFFECT_4 "old_school_04" #define PARTICLE_SCREEN_EFFECT_5 "old_school_05" #define PARTICLE_SCREEN_EFFECT_6 "old_school_06" #define PARTICLE_SCREEN_EFFECT_7 "old_school_07" #define PARTICLE_SCREEN_EFFECT_8 "old_school_08" #define PARTICLE_SCREEN_EFFECT_9 "old_school_09" #define PARTICLE_SCREEN_EFFECT_10 "old_school_10" #define PARTICLE_SCREEN_EFFECT_11 "old_school_11" #define PARTICLE_SCREEN_EFFECT_12 "old_school_12" #define PARTICLE_SCREEN_EFFECT_13 "old_school_13" #define PARTICLE_SCREEN_EFFECT_14 "old_school_14" #define PARTICLE_SCREEN_EFFECT_15 "old_school_15" #define PARTICLE_SCREEN_EFFECT_16 "old_school_16" #define PARTICLE_SCREEN_EFFECT_17 "old_school_17" #define PARTICLE_SCREEN_EFFECT_18 "old_school_18" #define PARTICLE_SCREEN_EFFECT_19 "old_school_19" #define PARTICLE_SCREEN_EFFECT_20 "old_school_20" #define PARTICLE_SCREEN_EFFECT_21 "old_school_21" #define PARTICLE_SCREEN_EFFECT_22 "old_school_22" #define PARTICLE_SCREEN_EFFECT_23 "old_school_23" #define PARTICLE_SCREEN_EFFECT_24 "old_school_24" #define NICK 0 #define ROCHELLE 1 #define COACH 2 #define ELLIS 3 #define BILL 4 #define ZOEY 5 #define FRANCIS 6 #define LOUIS 7 public Plugin:myinfo = { name = "particle_screen_effect", author = "Mister Game Over", description = "particle screen effect", version = "1.0", url = "https://steamcommunity.com/profiles/76561198203206199" } public OnPluginStart() { HookEvent("player_incapacitated", Event_Incapped); } public OnMapStart() { PrecacheParticle(PARTICLE_SCREEN_EFFECT_1); PrecacheParticle(PARTICLE_SCREEN_EFFECT_2); PrecacheParticle(PARTICLE_SCREEN_EFFECT_3); PrecacheParticle(PARTICLE_SCREEN_EFFECT_4); PrecacheParticle(PARTICLE_SCREEN_EFFECT_5); PrecacheParticle(PARTICLE_SCREEN_EFFECT_6); PrecacheParticle(PARTICLE_SCREEN_EFFECT_7); PrecacheParticle(PARTICLE_SCREEN_EFFECT_8); PrecacheParticle(PARTICLE_SCREEN_EFFECT_9); PrecacheParticle(PARTICLE_SCREEN_EFFECT_10); PrecacheParticle(PARTICLE_SCREEN_EFFECT_11); PrecacheParticle(PARTICLE_SCREEN_EFFECT_12); PrecacheParticle(PARTICLE_SCREEN_EFFECT_13); PrecacheParticle(PARTICLE_SCREEN_EFFECT_14); PrecacheParticle(PARTICLE_SCREEN_EFFECT_15); PrecacheParticle(PARTICLE_SCREEN_EFFECT_16); PrecacheParticle(PARTICLE_SCREEN_EFFECT_17); PrecacheParticle(PARTICLE_SCREEN_EFFECT_18); PrecacheParticle(PARTICLE_SCREEN_EFFECT_19); PrecacheParticle(PARTICLE_SCREEN_EFFECT_20); PrecacheParticle(PARTICLE_SCREEN_EFFECT_21); PrecacheParticle(PARTICLE_SCREEN_EFFECT_22); PrecacheParticle(PARTICLE_SCREEN_EFFECT_23); PrecacheParticle(PARTICLE_SCREEN_EFFECT_24); } public Action:PrecacheParticle(String:particlename[]) { new particle = CreateEntityByName("info_particle_system"); if (IsValidEntity(particle)) { DispatchKeyValue(particle, "effect_name", particlename); DispatchKeyValue(particle, "targetname", "particle"); DispatchSpawn(particle); ActivateEntity(particle); AcceptEntityInput(particle, "start"); CreateTimer(0.1, DeleteParticles, particle, TIMER_FLAG_NO_MAPCHANGE); } } public Action:CreateParticle(target, String:particlename[], Float:time, Float:origin) { if (target > 0) { new particle = CreateEntityByName("info_particle_system"); if (IsValidEntity(particle)) { new Float:pos[3]; GetEntPropVector(target, Prop_Send, "m_vecOrigin", pos); pos[2] += origin; TeleportEntity(particle, pos, NULL_VECTOR, NULL_VECTOR); DispatchKeyValue(particle, "effect_name", particlename); DispatchKeyValue(particle, "targetname", "particle"); DispatchSpawn(particle); ActivateEntity(particle); AcceptEntityInput(particle, "start"); CreateTimer(time, DeleteParticles, particle, TIMER_FLAG_NO_MAPCHANGE); } } } public Action:AttachParticle(target, String:particlename[], Float:time, Float:origin) { if (target > 0 && IsValidEntity(target)) { new particle = CreateEntityByName("info_particle_system"); if (IsValidEntity(particle)) { new Float:pos[3]; GetEntPropVector(target, Prop_Send, "m_vecOrigin", pos); pos[2] += origin; TeleportEntity(particle, pos, NULL_VECTOR, NULL_VECTOR); decl String:tName[64]; Format(tName, sizeof(tName), "Attach%d", target); DispatchKeyValue(target, "targetname", tName); GetEntPropString(target, Prop_Data, "m_iName", tName, sizeof(tName)); DispatchKeyValue(particle, "scale", ""); DispatchKeyValue(particle, "effect_name", particlename); DispatchKeyValue(particle, "parentname", tName); DispatchKeyValue(particle, "targetname", "particle"); DispatchSpawn(particle); ActivateEntity(particle); SetVariantString(tName); AcceptEntityInput(particle, "SetParent", particle, particle); AcceptEntityInput(particle, "Enable"); AcceptEntityInput(particle, "start"); CreateTimer(time, DeleteParticles, particle, TIMER_FLAG_NO_MAPCHANGE); } } } public Action:DeleteParticles(Handle:timer, any:particle) { if (IsValidEntity(particle)) { new String:classname[64]; GetEdictClassname(particle, classname, sizeof(classname)); if (StrEqual(classname, "info_particle_system", false)) AcceptEntityInput(particle, "Kill"); } } public Event_Incapped(Handle:hEvent, String:sEventName[], bool:bDontBroadcast) { new iClient; iClient = GetClientOfUserId(GetEventInt(hEvent, "userid")); if(iClient < 1 || iClient > MaxClients) return; if(!IsClientInGame(iClient) || !IsPlayerAlive(iClient)) return; if(GetClientTeam(iClient) == 2) { switch (GetEntProp(iClient, Prop_Send, "m_survivorCharacter")) { case NICK: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_1, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_2, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_3, 2.0, 0.0); } } } case ROCHELLE: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_4, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_5, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_6, 2.0, 0.0); } } } case COACH: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_7, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_8, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_9, 2.0, 0.0); } } } case ELLIS: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_10, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_11, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_12, 2.0, 0.0); } } } case BILL: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_13, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_14, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_15, 2.0, 0.0); } } } case ZOEY: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_16, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_17, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_18, 2.0, 0.0); } } } case FRANCIS: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_19, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_20, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_21, 2.0, 0.0); } } } case LOUIS: { switch(GetRandomInt(1,3)) { case 1: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_22, 2.0, 0.0); } case 2: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_23, 2.0, 0.0); } case 3: { AttachParticle(iClient, PARTICLE_SCREEN_EFFECT_24, 2.0, 0.0); } } } } } }
И разумеется сами частицы, можем взять с workshop
https://steamcommuni...end&p=1&days=-1
Необходимо заменить все названия, как основного (pcf), так и всех частиц. Для этого можно воспользоваться программой "Left 4 Dead 2 Authoring Tools"
Путь
библиотека/инструменты/Left 4 Dead 2 Authoring Tools.
Закинуть партикл (пример: old_school.pcf) в папку "particles" (если папки нет, то создать самостоятельно)
left4dead2/particles/закидываем
Так же нужно прописать его для каждой карты. Для этого создаём в папке maps текстовый файл (Пример для 1 карты).
left4dead2/maps/ c1m1_hotel_particles.txt
Содержимое.
particles_manifest { "file" "!particles/error.pcf" "file" "particles/steamworks.pcf" "file" "particles/environmental_fx.pcf" "file" "particles/rain_fx.pcf" "file" "particles/burning_fx.pcf" "file" "particles/fire_01.pcf" "file" "particles/fire_01L4D.pcf" "file" "particles/electrical_fx.pcf" "file" "particles/steam_fx.pcf" "file" "particles/locator_fx.pcf" "file" "particles/witch_fx.pcf" "file" "particles/speechbubbles.pcf" "file" "particles/rain_storm_fx.pcf" "file" "particles/military_artillery_impacts.pcf" "file" "particles/rope_fx.pcf" "file" "particles/spitter_fx.pcf" "file" "particles/fireworks_fx.pcf" "file" "particles/vehicle_fx.pcf" "file" "particles/insect_fx.pcf" "file" "particles/charger_fx.pcf" "file" "particles/item_fx.pcf" "file" "particles/gen_dest_fx.pcf" "file" "particles/tanker_explosion.pcf" "file" "particles/firework_crate_fx.pcf" // clean "file" "!particles/footstep_fx.pcf" "file" "!particles/screen_fx.pcf" "file" "!particles/smoker_fx.pcf" "file" "!particles/boomer_fx.pcf" "file" "!particles/hunter_fx.pcf" "file" "!particles/water_fx.pcf" "file" "!particles/tank_fx.pcf" "file" "!particles/blood_fx.pcf" // Were ! appear to be precached "file" "particles/infected_fx.pcf" "file" "particles/ ИМЯ ВАШЕГО ПАРТИКЛА .pcf" // ВСТАВЛЯЕМ ПАРТИКЛ (в моём случае old_school.pcf) //require cleaning "file" "!particles/survivor_fx.pcf" "file" "!particles/weapon_fx.pcf" "file" "!particles/impact_fx.pcf" //deprecated //"file" "particles/ui_fx.pcf" }
Выложил уже готовые ***_particles.txt для всех стандартных карт. (Всё, что нужно, это открыть каждый и дописать свой.)
https://yadi.sk/d/ACd-7UAm3Yi6kF
Важно! Файлы должны быть как на сервере, так и на контент-хостинге.
Прилагаю плагин, 24 пользовательских эффекта для выживших (по 3 уникальных - рандом), активируются эффекты во время падения.
[l4d2] custom_particle_screen_effect
Демонстрация:
1 https://yadi.sk/i/yA2GuWco3YjLhk
2 https://yadi.sk/i/XOKI00X43YjLi3
3 https://yadi.sk/i/BPbeP4uy3YjLiB
ROCHELLE
4 https://yadi.sk/i/_CrhHOlO3YjLiN
5 https://yadi.sk/i/1V0HBhz63YjLiQ
6 https://yadi.sk/i/PAsh0Iqz3YjLiZ
COACH
7 https://yadi.sk/i/bT-JMPO_3YjLid
8 https://yadi.sk/i/645uazjc3YjLig
9 https://yadi.sk/i/pKzcJrk53YjLik
ELLIS
10 https://yadi.sk/i/RstaH2uZ3YjLjk
11 https://yadi.sk/i/1y3Y7Iiv3YjLjo
12 https://yadi.sk/i/stx6yzB73YjLjz
BILL
13 https://yadi.sk/i/yinwqT9P3YjLk3
14 https://yadi.sk/i/Jzan7S4Z3YjLkA
15 https://yadi.sk/i/HcMXdwMs3YjLkC
ZOEY
16 https://yadi.sk/i/Cevmultu3YjLkG
17 https://yadi.sk/i/_4mjamNN3YjLkL
18 https://yadi.sk/i/7PmxVPai3YjLkX
FRANCIS
19 https://yadi.sk/i/uUpRfXT-3YjLkZ
20 https://yadi.sk/i/2PBrEWqZ3YjLkf
21 https://yadi.sk/i/zeSKYO7s3YjLkj
LOUIS
22 https://yadi.sk/i/laeZpjv63YjLku
23 https://yadi.sk/i/fUUEWkY53YjLkx
24 https://yadi.sk/i/5ZEf2Xjp3YjLm5
Сообщение отредактировал Game Over - L4D2 - CS:GO: 04 Июль 2018 - 11:36