Kewn
Участник
- Сообщения
- 321
- Реакции
- 61
Такая вот беда в плагине. Хелпаните)
Подскажите в чем беда)
Help:
L 04/19/2023 - 21:53:05: [SM] Call stack trace:
L 04/19/2023 - 21:53:05: [SM] [0] GetEntPropVector
L 04/19/2023 - 21:53:05: [SM] [1] Line 260, grenade_effects.sp::smokegrenade_detonate
L 04/19/2023 - 21:53:08: [SM] Exception reported: Property "m_vecOrigin" not found (entity 361/weaponworldmodel)
L 04/19/2023 - 21:53:08: [SM] Blaming: grenade_effects.smx
L 04/19/2023 - 21:53:08: [SM] Call stack trace:
L 04/19/2023 - 21:53:08: [SM] [0] GetEntPropVector
L 04/19/2023 - 21:53:08: [SM] [1] Line 260, grenade_effects.sp::smokegrenade_detonate
L 04/19/2023 - 21:53:19: [SM] Exception reported: Entity 354 (354) is invalid
L 04/19/2023 - 21:53:19: [SM] Blaming: grenade_effects.smx
L 04/19/2023 - 21:53:19: [SM] Call stack trace:
L 04/19/2023 - 21:53:19: [SM] [0] GetEntPropVector
L 04/19/2023 - 21:53:19: [SM] [1] Line 260, grenade_effects.sp::smokegrenade_detonate
L 04/19/2023 - 21:54:00: [SM] Exception reported: Entity 371 (371) is invalid
L 04/19/2023 - 21:54:00: [SM] Blaming: grenade_effects.smx
L 04/19/2023 - 21:54:00: [SM] Call stack trace:
L 04/19/2023 - 21:54:00: [SM] [0] GetEntPropVector
L 04/19/2023 - 21:54:00: [SM] [1] Line 260, grenade_effects.sp::smokegrenade_detonate
Кусок кода:
new Float:position[3], Float:origin[3];
position[0] = GetEventFloat(event, "x");
position[1] = GetEventFloat(event, "y");
position[2] = GetEventFloat(event, "z");
new size = GetArraySize(g_hSmokeGrenades);
new Handle:h_grenade, i_grenade;
for (new i = 0; i < size; i++)
{
h_grenade = GetArrayCell(g_hSmokeGrenades, i);
i_grenade = GetArrayCell(h_grenade, 1);
GetEntPropVector(i_grenade, Prop_Send, "m_vecOrigin", origin);
if (position[0] == origin[0] && position[1] == origin[1] && position[2] == origin[2])
{
new smoke = CreateEntityByName("env_smokestack");
if (smoke != -1)
{
DispatchKeyValue(smoke, "SmokeMaterial", "particle/particle_smokegrenade1.vmt");
DispatchKeyValue(smoke, "basespread", "30");
DispatchKeyValue(smoke, "spreadspeed", "5");
DispatchKeyValue(smoke, "speed", "5");
DispatchKeyValue(smoke, "startsize", "100");
DispatchKeyValue(smoke, "endsize", "100");
DispatchKeyValue(smoke, "rate", "5");
DispatchKeyValue(smoke, "jetlength", "30");
DispatchKeyValue(smoke, "renderamt", "200");
DispatchKeyValue(smoke, "Translucency", "150");
DispatchKeyValue(smoke, "rendercolor", "124 252 0");
if (DispatchSpawn(smoke))
{
TeleportEntity(smoke, position, NULL_VECTOR, NULL_VECTOR);
AcceptEntityInput(smoke, "TurnOn");
PushArrayCell(h_grenade, smoke);
}
}
new Handle:timer_remove = CreateTimer(SMOKE_TIMER, remove_smoke, EntIndexToEntRef(smoke), TIMER_FLAG_NO_MAPCHANGE);
PushArrayCell(h_grenade, timer_remove);
new Handle:timer_damage = CreateTimer(0.2, damage_players, EntIndexToEntRef(smoke), TIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT);
PushArrayCell(h_grenade, timer_damage);
new model = CreateEntityByName("prop_dynamic");
if (model != -1)
{
PushArrayCell(h_grenade, model);
DispatchKeyValueVector(model, "origin", position);
DispatchKeyValue(model, "model", SMOKE_MODEL);
AcceptEntityInput(model, "DisableCollision");
if (DispatchSpawn(model))
{
SetEntityMoveType(model, MOVETYPE_NONE);
TeleportEntity(model, position, NULL_VECTOR, NULL_VECTOR);
}
}
EmitSoundToAll(SMOKE_SOUND, model);
break;
}
}
}
Подскажите в чем беда)