RU
RU
UA
EN
PL
ГЛАВНАЯ
УСЛУГИ
ПЛАГИНЫ
КАРТЫ
REBUY
SCANMON
CASSA
SALE
ФОРУМ
МОНИТОР
HELP
КОНТАКТ
Главная
/
Plugins
/
Round_start_effects
Round_start_effects
Теги:
Скачать плагины csgo
Эффекты
При начале игры будет ефект
Компилятор: 1.10.0
131
Команды:
Кваров и команд нет
.sma / .sp
#include
new NuM; public Plugin:myinfo = { name = "Round Start Effects", description = "", author = "", version = "1.1", url = "" }; public OnPluginStart() { HookEvent("player_spawn", player_spawn, EventHookMode_Post); HookEvent("round_start", round_start, EventHookMode_Post); } public OnMapStart() { //PrecacheModel("models/props/cs_office/vending_machine.mdl", true); PrecacheModel("sprites/laserbeam.vmt", true); PrecacheModel("sprites/glow01.spr", true); } public round_start(Handle:event, String:name[], bool:silent) { NuM += 1; } public player_spawn(Handle:event, String:name[], bool:silent) { CreateTimer(0.05, TIMER_PlayerSpawn, GetEventInt(event, "userid")); } public Action:TIMER_PlayerSpawn(Handle:timer, any:client) { new iClient = GetClientOfUserId(client); if(iClient>1 && iClient <= MaxClients && IsPlayerAlive(iClient)) { new team = GetClientTeam(iClient); if (team < 2) { return Plugin_Stop; } decl Float:p[3]; GetClientAbsOrigin(iClient, p); if (NuM == 1) { Fire(iClient, p); } else if (NuM == 2) { Fx(iClient); } else if (NuM == 3) { Beam3(p, (team==3)?"0 0 255":"255 0 0"); } else if (NuM == 4) { Tesla3(p, (team==3)?"0 0 255":"255 0 0"); } else if (NuM == 5) { SpotLight3(iClient, p, (team==3)?"0 0 255":"255 0 0"); } else if (NuM == 6) { Sprite(iClient, p, (team==3)?"0 0 255":"255 0 0"); } else if (NuM == 7) { Beam1(p, (team==3)?"0 0 255":"255 0 0"); } else { NuM = 0; Spark(p); } } return Plugin_Stop; } Beam3(Float:center[3], String:sRGB[]) { decl Float:p1[3]; decl Float:p2[3]; decl Float:p3[3]; if (Get3Coords(center, p1, p2, p3, 50.0)) { center[2] += 125.0; Beam3Go(p1, center, sRGB); Beam3Go(p2, center, sRGB); Beam3Go(p3, center, sRGB); } } public bool:TraceFilter_Beam3(TraceEnt, mask) { return TraceEnt < 1 || TraceEnt > MaxClients; } Beam3Go(Float:p[3], Float:air[3], String:sRGB[]) { new entity = CreateEntityByName("env_beam", -1); if (entity < 1) { LogError("Can't create 'env_beam'"); return; } DispatchKeyValueVector(entity, "origin", p); SetEntPropVector(entity, Prop_Data, "m_vecEndPos", air, 0); SetEntityModel(entity, "sprites/laserbeam.vmt"); DispatchKeyValue(entity, "texture", "sprites/laserbeam.vmt"); SetEntPropFloat(entity, Prop_Send, "m_fAmplitude", 0.0, 0); DispatchKeyValue(entity, "life", "0"); DispatchKeyValue(entity, "BoltWidth", "5"); DispatchKeyValue(entity, "rendermode", "3"); DispatchKeyValue(entity, "rendercolor", sRGB); DispatchKeyValue(entity, "renderamt", "255"); DispatchSpawn(entity); SetVariantString("OnUser1 !self:kill::1.0:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); return; } Beam1(Float:center[3], String:sRGB[]) { new entity = CreateEntityByName("env_beam", -1); if (entity < 1) { LogError("Can't create 'env_beam'"); return; } TR_TraceRayFilter(center, center, 33570827, RayType:1, TraceFilter_Beam3); if (TR_DidHit(Handle:0)) { TR_GetEndPosition(center, Handle:0); center[2] -= 10.0; } else { center[2] += 250.0; } SetEntPropVector(entity, Prop_Data, "m_vecEndPos", center, 0); SetEntityModel(entity, "sprites/laserbeam.vmt"); DispatchKeyValue(entity, "texture", "sprites/laserbeam.vmt"); SetEntPropFloat(entity, Prop_Send, "m_fAmplitude", 10.0, 0); DispatchKeyValue(entity, "life", "0"); DispatchKeyValue(entity, "BoltWidth", "10"); DispatchKeyValue(entity, "rendermode", "3"); DispatchKeyValue(entity, "rendercolor", sRGB); DispatchKeyValue(entity, "renderamt", "255"); DispatchSpawn(entity); SetVariantString("OnUser1 !self:kill::0.3:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); return; } Fire(client, Float:p[3]) { new entity = CreateEntityByName("info_particle_system", -1); if (entity < 1) { LogError("Can't create 'info_particle_system'"); return; } DispatchKeyValue(entity, "effect_name", "env_fire_large"); DispatchKeyValueVector(entity, "origin", p); DispatchSpawn(entity); SetVariantString("!activator"); AcceptEntityInput(entity, "SetParent", client); ActivateEntity(entity); AcceptEntityInput(entity, "Start"); SetVariantString("OnUser1 !self:kill::1.5:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); return; } Fx(client) { SetEntityRenderFx(client, RenderFx:13); CreateTimer(1.5, TIMER_fx, client, 2); return; } public Action:TIMER_fx(Handle:timer, any:client) { if (IsClientInGame(client)) { SetEntityRenderFx(client, RenderFx:0); } return Plugin_Stop; } Tesla3(Float:center[3], String:sRGB[]) { center[2] += 35.0; decl Float:p1[3]; decl Float:p2[3]; decl Float:p3[3]; if (Get3Coords(center, p1, p2, p3, 50.0)) { Tesla3Go(p1, sRGB); Tesla3Go(p2, sRGB); Tesla3Go(p3, sRGB); } return; } Tesla3Go(Float:p[3], String:sRGB[]) { new entity = CreateEntityByName("point_tesla", -1); if (entity < 1) { LogError("Can't create 'point_tesla'"); return; } DispatchKeyValueVector(entity, "origin", p); DispatchKeyValue(entity, "texture", "sprites/laserbeam.vmt"); DispatchKeyValue(entity, "m_Color", sRGB); DispatchKeyValueFloat(entity, "m_flRadius", 150.0); DispatchKeyValueFloat(entity, "beamcount_min", 5.0); DispatchKeyValueFloat(entity, "beamcount_max", 15.0); DispatchKeyValueFloat(entity, "interval_min", 1.0); DispatchKeyValueFloat(entity, "interval_max", 1.0); DispatchKeyValueFloat(entity, "lifetime_min", 0.2); DispatchKeyValueFloat(entity, "lifetime_max", 0.2); DispatchKeyValueFloat(entity, "thick_min", 10.0); DispatchKeyValueFloat(entity, "thick_max", 25.0); DispatchSpawn(entity); AcceptEntityInput(entity, "DoSpark"); SetVariantString("OnUser1 !self:kill::0.2:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); return; } SpotLight3(client, Float:center[3], String:sRGB[]) { decl Float:p1[3]; decl Float:p2[3]; decl Float:p3[3]; if (Get3Coords(center, p1, p2, p3, 50.0)) { new entity = CreateEntityByName("func_rotating", -1); decl String:RotatorName[28]; Format(RotatorName, 25, "rttr%d", entity); DispatchKeyValue(entity, "targetname", RotatorName); DispatchKeyValueVector(entity, "origin", center); DispatchKeyValue(entity, "spawnflags", "64"); DispatchKeyValue(entity, "friction", "20"); SetEntPropFloat(entity, Prop_Data, "m_flMaxSpeed", 250.0, 0); DispatchKeyValue(entity, "dmg", "0"); DispatchKeyValue(entity, "solid", "0"); DispatchSpawn(entity); SetVariantString("OnUser1 !self:kill::2.5:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); SpotLight3Go(p1, sRGB, RotatorName); SpotLight3Go(p2, sRGB, RotatorName); SpotLight3Go(p3, sRGB, RotatorName); SetVariantString("!activator"); AcceptEntityInput(entity, "SetParent", client, entity, 0); AcceptEntityInput(entity, "Start"); } return; } SpotLight3Go(Float:p[3], String:sRGB[], String:RotatorName[]) { new entity = CreateEntityByName("point_spotlight", -1); if (entity < 1) { LogError("Can't create point_spotlight"); return 0; } DispatchKeyValue(entity, "spawnflags", "2"); DispatchKeyValueVector(entity, "origin", p); DispatchKeyValue(entity, "SpotlightLength", "150"); DispatchKeyValue(entity, "SpotlightWidth", "25"); DispatchKeyValue(entity, "rendermode", "5"); DispatchKeyValue(entity, "rendercolor", sRGB); DispatchKeyValue(entity, "renderamt", "255"); DispatchKeyValue(entity, "scale", "5"); DispatchKeyValue(entity, "angles", "-90 0 0"); DispatchSpawn(entity); SetVariantString(RotatorName); AcceptEntityInput(entity, "SetParent"); AcceptEntityInput(entity, "LightOn"); SetVariantString("OnUser1 !self:LightOff::1.9:1"); AcceptEntityInput(entity, "AddOutput"); SetVariantString("OnUser1 !self:kill::2.0:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); return entity; } Sprite(client, Float:center[3], String:sRGB[]) { new entity = CreateEntityByName("env_sprite", -1); if (entity < 1) { LogError("Can't create 'env_sprite'"); return; } center[2] += 35.0; DispatchKeyValueVector(entity, "origin", center); DispatchKeyValue(entity, "model", "sprites/glow01.spr"); DispatchKeyValue(entity, "rendermode", "5"); DispatchKeyValue(entity, "renderamt", "255"); DispatchKeyValue(entity, "rendercolor", sRGB); DispatchKeyValue(entity, "scale", "5"); DispatchSpawn(entity); AcceptEntityInput(entity, "Shocvarprite"); SetVariantString("!activator"); AcceptEntityInput(entity, "SetParent", client, entity, 0); SetVariantString("OnUser1 !self:HideSprite::2.0:1"); AcceptEntityInput(entity, "AddOutput"); SetVariantString("OnUser1 !self:kill::2.1:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); return; } Spark(Float:p[3]) { new entity = CreateEntityByName("env_spark", -1); if (entity < 1) { LogError("Can't create 'env_spark'"); return; } p[2] += 45.0; DispatchKeyValueVector(entity, "origin", p); DispatchKeyValue(entity, "Magnitude", "8"); DispatchKeyValue(entity, "MaxDelay", "3"); DispatchKeyValue(entity, "TrailLength", "2"); DispatchSpawn(entity); AcceptEntityInput(entity, "StartSpark"); SetVariantString("OnUser1 !self:kill::0.3:1"); AcceptEntityInput(entity, "AddOutput"); AcceptEntityInput(entity, "FireUser1"); return; } bool:Get3Coords(Float:center[3], Float:p1[3], Float:p2[3], Float:p3[3], Float:dist) { new entity = CreateEntityByName("prop_dynamic_override", -1); if (entity < 1) { LogError("CreateEntityByName error: prop_dynamic_override"); return false; } DispatchKeyValueVector(entity, "origin", center); //SetEntityModel(entity, "models/props/cs_office/vending_machine.mdl"); DispatchKeyValue(entity, "solid", "0"); DispatchSpawn(entity); Get3Coords_p(entity, p1, dist); Get3Coords_p(entity, p2, dist); Get3Coords_p(entity, p3, dist); AcceptEntityInput(entity, "Kill"); return true; } Get3Coords_p(entity, Float:pos[3], Float:dist) { decl Float:a[3]; GetEntPropVector(entity, Prop_Send, "m_angRotation", a, 0); a[1] += 120.0; TeleportEntity(entity, NULL_VECTOR, a, NULL_VECTOR); decl Float:p[3]; GetEntPropVector(entity, Prop_Data, "m_vecAbsOrigin", p, 0); decl Float:direction[3]; a[0] = 0.0; a[2] = 0.0; GetAngleVectors(a, direction, NULL_VECTOR, NULL_VECTOR); p[0] = p[0] + direction[0] * dist; p[1] = p[1] + direction[1] * dist; pos[0] = p[0]; pos[1] = p[1]; pos[2] = p[2]; return; }
Отправить
Загрузил
manel4ik
2024-01-17 18:12:52
0
17
Установить на сервер
Скачать
Нет оплаченых серверов
Купить сервер CS 1.6
Купить сервер CS:GO
Купить сервер CSS v34
Подключить свой VDS к панели
Данная иконка означает, что плагин был проверен администрацией хостинга на тестовом сервере, и проблем с ним не было выявлено. Рекомендуем ставить исключительно проверенные плагины.
Плагин загружен на сервер, но проверка еще не была проведена.
CSHOST.COM.UA 2012-2024 Хостинг игровых серверов