i'm trying to save the c4 entity id in a global variable but when the round start, instead of getting one "weapon_c4", i got 2 entity of c4 bombs... my question is, why do i get 2 of them ( at any map ) and which one is the real one...
at round start event. the code is only for checking why do i get 2
gBomb is returning the first c4 id but why there are 2 weapon_c4
Code:
gBomb = engfunc(EngFunc_FindEntityByString, -1, "classname", "weapon_c4")
if (!gBomb)
return
Code:
new EntClass[32]
new Entity
new Float:fOrigin[3]
pev(1, pev_origin, fOrigin)
while((Entity = engfunc (EngFunc_FindEntityInSphere, Entity, fOrigin, -1)))
{
pev(Entity, pev_classname, EntClass, 31)
ColorChat(0, "Entity id: %d, Entity class: %s", Entity, EntClass)
}