Черная вдова
Участник
- Сообщения
- 2,795
- Реакции
- 670
C-подобный:
new weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon")
index = CreateEntityByName("prop_dynamic_override", -1);
if (0 < index)
{
new Float:position[3];
decl String:m_ModelName[PLATFORM_MAX_PATH];
GetEntPropString(weapon, Prop_Data, "m_ModelName", m_ModelName, sizeof(m_ModelName));
ReplaceString(m_ModelName, sizeof(m_ModelName), "v_", "w_");
PrintToChatAll("%s",m_ModelName);
PrecacheModel(m_ModelName, true);
SetVariantString("!activator");
AcceptEntityInput(index, "SetParent", client);
DispatchKeyValue(index, "model", m_ModelName);
DispatchKeyValue(index, "spawnflags", "256");
DispatchKeyValue(index, "solid", "0");
//SetEntPropEnt(index, Prop_Send, "m_hOwnerEntity", weapon);
DispatchKeyValueVector(index, "origin", position);
SetVariantString("weapon_hand_R");
AcceptEntityInput(index, "SetParentAttachment", client);
DispatchSpawn(index);
SetEntityRenderMode(index, RENDER_TRANSCOLOR);
SetEntityRenderColor(index, 255, 255, 255, 150);
position[0] = -5.0;
TeleportEntity(index, position, NULL_VECTOR, NULL_VECTOR);
}
Вложения
Последнее редактирование: