 |
|
Senior Member
|

12-20-2008
, 20:40
Re: Infinite roundtime, remove bombsites
|
#2
|
why not using fakemeta?..
Quote:
new Float:g_BombSites_origin[3]
new Float:g_BombSites_mins[3]
new Float:g_BombSites_maxs[3]
public create_bs() {
new ent
ent = engfunc(EngFunc_CreateNamedEntity, engfunc (EngFunc_AllocString, "info_bomb_target"))
if(pev_valid(ent))
set_pev(ent, pev_origin, g_BombSites_oigin)
dllfunc(DLLFunc_Spawn, ent)
}
|
Quote:
public destroy_bs(){
new ent
while ((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", "info_bomb_target")) != 0)
engfunc(EngFunc_RemoveEntity,ent)
}
|
and you should know that entity_set_origin doesn't work for brush entity
Quote:
public create_bs_brushent() {//brush entity
new ent
ent = engfunc(EngFunc_CreateNamedEntity, engfunc (EngFunc_AllocString, "func_bomb_target"))
if(pev_valid(ent)){
engfunc(EngFunc_SetSize, ent, g_bombsites_mins, g_bombsites_maxs)
engfunc(EngFunc_SetOrigin, ent, g_bombsites_origin)
dllfunc(DLLFunc_Spawn, ent)
}
}
|
Last edited by hzqst; 12-20-2008 at 20:48.
|
|
|
|