728x90
우선 밑의 구분선까지의 스크립트는 간단히 클라이언트에게 트레일을 기부해 주는 방법입니다.
기부만 가능합니다 ^^
주의점 : 클라이언트가 멈추거나 움직이지 않을때 트레일은 다시 생겨나지 않습니다.
---------------------------------------------------------------------------------------------------------
new g_iBeamSprite;
public OnMapStart()
{
g_iBeamSprite = PrecacheModel("materials/sprites/crystal_beam1.vmt");
}
public fn_example(client)
{
TE_SetupBeamFollow(client,g_iBeamSprite,0,2.0,10.0,10.0,10,{255,255,0,255});
}
public OnMapStart()
{
g_iBeamSprite = PrecacheModel("materials/sprites/crystal_beam1.vmt");
}
public fn_example(client)
{
TE_SetupBeamFollow(client,g_iBeamSprite,0,2.0,10.0,10.0,10,{255,255,0,255});
}
---------------------------------------------------------------------------------------------------------
밑의 자료는 엔티티(수류탄) 에 다가 트레일을 다는 방법입니다.
---------------------------------------------------------------------------------------------------------
#include <sourcemod>
#include <sdktools>
#include <hooker>
#include <sdktools>
#include <hooker>
#pragma semicolon 1
#define FragColor {225,0,0,225}
#define FlashColor {225,225,225,225}
#define SmokeColor {0,225,0,225}
#define FlashColor {225,225,225,225}
#define SmokeColor {0,225,0,225}
new BeamSprite;
new Handle:GTrailsEnabled;
new Handle:GTrailsEnabled;
public OnMapStart() BeamSprite = PrecacheModel("materials/sprites/crystal_beam1.vmt");
public OnPluginStart()
{
CreateConVar("gt_version", "1.1", "Grenade Trails Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
GTrailsEnabled = CreateConVar("gt_enables", "1", "Enables/Disables Grenade Trails");
}
public HookerOnEntityCreated(Entity, const String:Classname[])
{
if(GetConVarInt(GTrailsEnabled) != 1)
return;
if(strcmp(Classname, "hegrenade_projectile") == 0)
{
TE_SetupBeamFollow(Entity, BeamSprite, 0, Float:1.0, Float:10.0, Float:10.0, 5, FragColor);
TE_SendToAll();
} else if(strcmp(Classname, "flashbang_projectile") == 0)
{
TE_SetupBeamFollow(Entity, BeamSprite, 0, Float:1.0, Float:10.0, Float:10.0, 5, FlashColor);
TE_SendToAll();
} else if(strcmp(Classname, "smokegrenade_projectile") == 0)
{
TE_SetupBeamFollow(Entity, BeamSprite, 0, Float:1.0, Float:10.0, Float:10.0, 5, SmokeColor);
TE_SendToAll();
}
return;
}
{
CreateConVar("gt_version", "1.1", "Grenade Trails Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
GTrailsEnabled = CreateConVar("gt_enables", "1", "Enables/Disables Grenade Trails");
}
public HookerOnEntityCreated(Entity, const String:Classname[])
{
if(GetConVarInt(GTrailsEnabled) != 1)
return;
if(strcmp(Classname, "hegrenade_projectile") == 0)
{
TE_SetupBeamFollow(Entity, BeamSprite, 0, Float:1.0, Float:10.0, Float:10.0, 5, FragColor);
TE_SendToAll();
} else if(strcmp(Classname, "flashbang_projectile") == 0)
{
TE_SetupBeamFollow(Entity, BeamSprite, 0, Float:1.0, Float:10.0, Float:10.0, 5, FlashColor);
TE_SendToAll();
} else if(strcmp(Classname, "smokegrenade_projectile") == 0)
{
TE_SetupBeamFollow(Entity, BeamSprite, 0, Float:1.0, Float:10.0, Float:10.0, 5, SmokeColor);
TE_SendToAll();
}
return;
}