AlmazON
Не путать с самим yand3xmail
- Сообщения
- 5,099
- Реакции
- 2,755
Попробуй пересоздать мяч со своими характеристиками:без результатов
PHP:
#include <sdktools>
public OnPluginStart() RegConsoleCmd("sm_ball", CreateSoccerBall, "Создать мяч вместо объекта на прицеле.");
public OnMapStart()
{
AddFileToDownloadsTable("models/forlix/soccer/soccerball.dx80.vtx");
AddFileToDownloadsTable("models/forlix/soccer/soccerball.dx90.vtx");
AddFileToDownloadsTable("models/forlix/soccer/soccerball.mdl");
AddFileToDownloadsTable("models/forlix/soccer/soccerball.phy");
AddFileToDownloadsTable("models/forlix/soccer/soccerball.sw.vtx");
AddFileToDownloadsTable("models/forlix/soccer/soccerball.vvd");
AddFileToDownloadsTable("models/forlix/soccer/soccerball.xbox.vtx");
AddFileToDownloadsTable("materials/models/forlix/soccer/soccerball.vmt");
AddFileToDownloadsTable("materials/models/forlix/soccer/soccerball.vtf");
PrecacheModel("models/forlix/soccer/soccerball.mdl");
}
public Action:CreateSoccerBall(client, args)
{
if (client)
{
decl entity;
if ((entity = GetClientAimTarget(client, false)) != -1)
{
decl Float:origin[3];
GetEntPropVector(entity, Prop_Data, "m_vecOrigin", origin);
RemoveEdict(entity);
if ((entity = CreateEntityByName("prop_physics_override")) != -1)
{
SetEntityModel(entity, "models/forlix/soccer/soccerball.mdl");
DispatchKeyValue(entity, "StartDisabled", "false");
DispatchKeyValue(entity, "Solid", "6");
DispatchKeyValue(entity, "spawnflags", "1026");
DispatchKeyValue(entity, "classname", "models/forlix/soccer/soccerball.mdl");
DispatchKeyValueVector(entity, "origin", origin);
DispatchSpawn(entity);
AcceptEntityInput(entity, "TurnOn");
AcceptEntityInput(entity, "EnableCollision");
SetEntProp(entity, Prop_Data, "m_CollisionGroup", 5);
//SetEntityMoveType(entity, MOVETYPE_VPHYSICS);
//AcceptEntityInput(entity, "Wake");
//AcceptEntityInput(entity, "EnableMotion");
PrintToChat(client, "\x01Объект \x03%i \x01заменён на \x05мяч\x01.", entity);
}
}
}
return Plugin_Handled;
}
public OnGameFrame()
{
static String:classname[32], entity;
for (new i = 1; i <= MaxClients; ++i)
{
if (IsClientInGame(i) && (entity = GetClientAimTarget(i, false)) != -1)
{
GetEdictClassname(entity, classname, sizeof(classname));
PrintHintText(i, "Вы смотрите на\nEntity index: %i classname: %s", entity, classname);
}
}
}