[CS:S/CS:GO] Round Start Effects

R1KO

fuck society
Сообщения
9,457
Реакции
7,786
  • Команда форума
  • #41
Разный эффект для каждого игрока.
Сами эффекты не смотрел.

PHP:
#include <sdktools>

public Plugin:myinfo =
{
	name = "Round Start Effects",
	description = "",
	author = "",
	version = "1.1",
	url = ""
};

new const String:g_sColors[][] =
{
	"255 0 0",
	"0 0 255"
};

public OnPluginStart()
{
	HookEvent("player_spawn", player_spawn);
}

public OnMapStart()
{
	//PrecacheModel("models/props/cs_office/vending_machine.mdl", true);
	PrecacheModel("sprites/laserbeam.vmt", true);
	PrecacheModel("sprites/glow01.spr", true);
}

public player_spawn(Handle:event, String:name[], bool:silent)
{
	CreateTimer(0.05, TIMER_PlayerSpawn, GetEventInt(event, "userid"));
}

public Action:TIMER_PlayerSpawn(Handle:timer, any:UserID)
{
	new iClient = GetClientOfUserId(UserID);
	if(iClient && IsPlayerAlive(iClient))
	{
		new team = GetClientTeam(iClient);
		
		if (team > 1)
		{
			decl Float:p[3];
			GetClientAbsOrigin(iClient, p);
			switch(Math_GetRandomInt(1, 8))
			{
			case 1:
				{
					Fire(iClient, p);
				}
			case 2:
				{
					Fx(iClient);
				}
			case 3:
				{
					Beam3(p, g_sColors[team-2]);
				}
			case 4:
				{
					Tesla3(p, g_sColors[team-2]);
				}
			case 5:
				{
					SpotLight3(iClient, p, g_sColors[team-2]);
				}
			case 6:
				{
					Sprite(iClient, p, g_sColors[team-2]);
				}
			case 7:
				{
					Beam1(p, g_sColors[team-2]);
				}
			case 8:
				{
					Spark(p);
				}
			}
		}
	}
	return Plugin_Stop;
}

Math_GetRandomInt(min, max)
{
	new random = GetURandomInt();
	
	if (random == 0) {
		random++;
	}

	return RoundToCeil(float(random) / (2147483647.0 / float(max - min + 1))) + min - 1;
}

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");
}

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");
}

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");
}

Fx(client)
{
	SetEntityRenderFx(client, RenderFx:13);
	CreateTimer(1.5, TIMER_fx, client, 2);
}

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);
	}
}

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");
}

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");
	}
}

SpotLight3Go(Float:p[3], String:sRGB[], String:RotatorName[])
{

	new entity = CreateEntityByName("point_spotlight", -1);
	if (entity < 1)
	{
		LogError("Can't create point_spotlight");
		return;
	}
	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");
}

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");
}

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");
}
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];
}
 

DexKekcuk #13

Участник
Сообщения
628
Реакции
69
Разный эффект для каждого игрока.
Сами эффекты не смотрел.

PHP:
#include <sdktools>

public Plugin:myinfo =
{
	name = "Round Start Effects",
	description = "",
	author = "",
	version = "1.1",
	url = ""
};

new const String:g_sColors[][] =
{
	"255 0 0",
	"0 0 255"
};

public OnPluginStart()
{
	HookEvent("player_spawn", player_spawn);
}

public OnMapStart()
{
	//PrecacheModel("models/props/cs_office/vending_machine.mdl", true);
	PrecacheModel("sprites/laserbeam.vmt", true);
	PrecacheModel("sprites/glow01.spr", true);
}

public player_spawn(Handle:event, String:name[], bool:silent)
{
	CreateTimer(0.05, TIMER_PlayerSpawn, GetEventInt(event, "userid"));
}

public Action:TIMER_PlayerSpawn(Handle:timer, any:UserID)
{
	new iClient = GetClientOfUserId(UserID);
	if(iClient && IsPlayerAlive(iClient))
	{
		new team = GetClientTeam(iClient);
		
		if (team > 1)
		{
			decl Float:p[3];
			GetClientAbsOrigin(iClient, p);
			switch(Math_GetRandomInt(1, 8))
			{
			case 1:
				{
					Fire(iClient, p);
				}
			case 2:
				{
					Fx(iClient);
				}
			case 3:
				{
					Beam3(p, g_sColors[team-2]);
				}
			case 4:
				{
					Tesla3(p, g_sColors[team-2]);
				}
			case 5:
				{
					SpotLight3(iClient, p, g_sColors[team-2]);
				}
			case 6:
				{
					Sprite(iClient, p, g_sColors[team-2]);
				}
			case 7:
				{
					Beam1(p, g_sColors[team-2]);
				}
			case 8:
				{
					Spark(p);
				}
			}
		}
	}
	return Plugin_Stop;
}

Math_GetRandomInt(min, max)
{
	new random = GetURandomInt();
	
	if (random == 0) {
		random++;
	}

	return RoundToCeil(float(random) / (2147483647.0 / float(max - min + 1))) + min - 1;
}

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");
}

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");
}

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");
}

Fx(client)
{
	SetEntityRenderFx(client, RenderFx:13);
	CreateTimer(1.5, TIMER_fx, client, 2);
}

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);
	}
}

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");
}

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");
	}
}

SpotLight3Go(Float:p[3], String:sRGB[], String:RotatorName[])
{

	new entity = CreateEntityByName("point_spotlight", -1);
	if (entity < 1)
	{
		LogError("Can't create point_spotlight");
		return;
	}
	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");
}

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");
}

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");
}
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];
}

Шеин делал так, чтоб на раунд не использовалась пачка эффектов, в раунд для всех игроков использовался один эффект.

Ну мы проверяли в ксс каждый эффект работало безупречно...
 

Alraune

Участник
Сообщения
216
Реакции
52
На v34 какой то из эффектов отсутствует. Ничего не происходит в этот момент, а в логи выдаёт ошибки
[round_start_effects.smx] Can't create 'info_particle_system'
Именно в этот момент. Если возможно , помогите выяснить и исключить этот эффект. Не хочется забивать лог ((
 

Саша Шеин

Кому костылей?
Сообщения
1,697
Реакции
621
На v34 какой то из эффектов отсутствует. Ничего не происходит в этот момент, а в логи выдаёт ошибки
[round_start_effects.smx] Can't create 'info_particle_system'
Именно в этот момент. Если возможно , помогите выяснить и исключить этот эффект. Не хочется забивать лог ((

На CSS v34 не хочет работать огонь, у кого есть решение?
 

Alraune

Участник
Сообщения
216
Реакции
52
На CSS v34 не хочет работать огонь, у кого есть решение?
Заменить этот эф. или хотя бы исключить его для 34... Пожалуйста! Я подобный плагин у WS покупала, но он после обновления см еррорит - жуть. Перепиши плагин ляя 34..пж :) Без этого огня..
 

Саша Шеин

Кому костылей?
Сообщения
1,697
Реакции
621
Danyas, так и есть.

Добавлено через 4 минуты
Работоспособность в:

CS:GO
- Работают все эффекты кроме Spark (env_spark)

CS:S
- Всё работает

CS:S v34
- Не работает огонь. (Может ещё что-то?)
 
Последнее редактирование:

Andy Freeman

Fatal error
Сообщения
400
Реакции
91
Danyas, так и есть.

Добавлено через 4 минуты
Работоспособность в:

CS:GO
- Работают все эффекты кроме Spark (env_spark)

CS:S
- Всё работает

CS:S v34
- Не работает огонь. (Может ещё что-то?)

как тебе идейка эффект молния для ксго при спавне и еще каких-то эффектов добавить и сделать 3 раздельных версии для ксго убрать env_spark ксс так оставит и ксс v34 убрать огонь
 

Alraune

Участник
Сообщения
216
Реакции
52
Так это типа из "Любви К Науке"..или желание создать полноценный и нужный УНИВЕРСАЛЬНЫЙ плагин? Тогда нужен конфиг с возможностью настройки исключения включения - эффектов. Не думаю что Огонь заработает когда либо на измученом 34.. Хотя растворение трупа с горением работает. Но я лично убрала. Смотрится старанно ( огонь кучками ) и крашило сервер периодически.
 

Саша Шеин

Кому костылей?
Сообщения
1,697
Реакции
621
Alraune, вообще в планах вести поддержку данного плагина.
Уже сделал различные версии тоьько интересно почему у WS'a написано что поддерживаются все версии CS?! Похоже ещё и предпоследний эффект не функционирует на ксго.

На сл. неделе займусь плагином.

Ноесть огромная просьба к умельцам форума:
Помогите решить проблемы не совместимости и какойто эффект привязан к нулевым кординатам.
 

Alraune

Участник
Сообщения
216
Реакции
52
У WS огня в моём плагине не было, но ошибки выдавало постоянно каждый респаун, насколько я поняла после обновления см на 1.6.3. Я писала - он не ответил. Но там и без настроек. Три эффекта вроде всего ( лучи, цветной экран, молнии ..но смотрелось сочно :р ) Решишь с 34 - пиши в личку . За чистый лог сотни не жалко ))
 

Andy Freeman

Fatal error
Сообщения
400
Реакции
91
Протестировал в ксго один раз многие стимы и нонстимы ксго вылетела где-то 10 человек при респавне вылетел ксго игра
 

Саша Шеин

Кому костылей?
Сообщения
1,697
Реакции
621
Тестируйте.
 

Вложения

  • round_start_effects.sp
    16.7 КБ · Просмотры: 112

SlavON

Добрая душа
Сообщения
1,582
Реакции
326
Протестировал в ксго один раз многие стимы и нонстимы ксго вылетела где-то 10 человек при респавне вылетел ксго игра

Кстати точно, я раз вылетел, потом сразу несколько человек вылетело.
 

Саша Шеин

Кому костылей?
Сообщения
1,697
Реакции
621
Наверно какойто текстурки нет в CSGO.
В тестовой версии реализована настройка через конфиг.
(На CSGO возможно не стартанёт)
Надо добавить МаркНатив (Забыл а щас уже не дома)
 

Alraune

Участник
Сообщения
216
Реакции
52
Протестировала.. Эффект постоянно тот же - облако в цвет тимы и спарк . И ладо бы...но теперь ошибки каждый раунд на каждом респауне.
v 34 SourceMod (1.6.3)
L 07/09/2015 - 12:32:11: [round_start_effects.smx] Can't create 'info_particle_system'
Жаль ((
Попробую из конфика отключать по одному и проверять эффекты. Уж очень нравится )
 
Последнее редактирование:

Саша Шеин

Кому костылей?
Сообщения
1,697
Реакции
621
Alraune, какие настройки стоят?

Добавлено через 1 минуту
Alraune, цвет экрана и тряска экрана работает?
 
Последнее редактирование:

Alraune

Участник
Сообщения
216
Реакции
52
Вечером отпишусь. Вчера неудачно пыталась обновить см ( сервер тупо встал после этого ) Вернула см с панели арены..но видимо не совсем удачно. В логах появились новые мОмЕнты.. [CSTRIKE] HandleCommand_Buy detour could not be initialized - Disabled OnBuyCommand forward
L 07/09/2015 - 13:13:49: [CSTRIKE] Could not locate HandleCommand_Buy - Disabling detour. Для чистоты эксперимента сделаю бэкап и попробую все эффекты по одному. Пока вот так и ошибок именно по плагину нет. Но отключала на обум.
Оставила :
Telse
фонарики
Spark
ShakeScreen
моргание
ColorScream

Добавлено через 14 часов 13 минут
Alraune, какие настройки стоят?

Добавлено через 1 минуту
Alraune, цвет экрана и тряска экрана работает?
На 34 работают все эффекты кроме огня. Проверила.
 
Последнее редактирование:

Димок

Участник
Сообщения
153
Реакции
7
Late precache of sprites/light_glow03.vmt
Late precache of sprites/glow_test02.vmt
prop at -832 -760 169 missing modelname
prop at -832 -760 329 missing modelname
prop at -832 -760 329 missing modelname
prop at -832 -856 172 missing modelname
prop at -832 -856 332 missing modelname
prop at -832 -856 332 missing modelname
prop at -736 -920 169 missing modelname
prop at -736 -920 329 missing modelname
prop at -736 -920 329 missing modelname

В консоле спамит, карта de_dust2.
 
Сверху Снизу