Thank you Avalanche.
I thought about something like that but i wasn't sure how to stop it.
EDIT2: It works now.
current function:
Code:
stock FindEntAtOrigin(Float:fOrigin[3]) {
new classname[10], Float:fRadius, ent
while ( fRadius < 50.0 && ! ent ) {
fRadius += 10.0
ent = g_MaxPlayers
while ( ent != 0 ) {
ent = engfunc(EngFunc_FindEntityInSphere, ent, fOrigin, fRadius)
pev(ent, pev_classname, classname, 9)
if ( equal(classname, "wpn_spawn") )
return ent;
}
}
return 0;
}