Hi there,
so i'm editing Naris and L.Duke
Tripmines plugin, to make Freeze mines. I need a little explanation about this code. If i get it right, each tripmine entity is added to array. For example: g_SavedEntityRef[c], and then it is used to watch, who passed the beam, to re-create mine. So if i want to add other type of tripmine- freeze mine, i need to create another one array, f. e: g_SavedEntityRef_freeze[d]. Right? It would be something like:
PHP Code:
for (new c = MaxClients; c < maxents; c++ && new d = MaxClients; d < maxents; d++)
Default code:
PHP Code:
public Action:RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
decl String:classname[64];
new maxents = GetMaxEntities();
for (new c = MaxClients; c < maxents; c++)
{
new ref = g_SavedEntityRef[c];
if (ref != 0 && EntRefToEntIndex(ref) == c) // it's an entity we created
{
new beam_ent, mine_ent;
GetEntityNetClass(c, classname, sizeof(classname));
if (StrEqual(classname, "CBeam")) // it's a beam
{
beam_ent = c;
mine_ent = EntRefToEntIndex(g_TripmineOfBeam[c]);
}
else // it must be a tripmine
{
mine_ent = c;
beam_ent = GetEntPropEnt(mine_ent, Prop_Send, "m_hEffectEntity");
}
RemoveBeamEntity(beam_ent);
RemoveMineEntity(mine_ent);
}
}
}
Thanks a lot.
P.S It was hard to explain this part. Please ask me, if you didn't get the question, i'll try to explain it in other way.