starting at gMaxplayers or gMaxplayers+1 is crap, no matter which way you use... you have to set the iButton var although you dont have to + you use an operator, i hope you see why its crap.
tbh, both of you should have seen several plugin which search for an entity by a given classname by find_ent_by_* or EngFunc_FindEntityByString. did you ever see someone setting the startvalue to gMaxplayers?
PHP Code:
// tested, works
#include <amxmodx>
#include <fakemeta>
#pragma semicolon 1
public plugin_init( )
{
register_plugin( "I", "<3", "xPaw" );
register_event( "HLTV", "eventHLTV", "a", "1=0", "2=0" );
}
public eventHLTV( )
{
new ent;
while( ( ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_button" ) ) != 0 )
{
dllfunc( DLLFunc_Think, ent );
}
}
__________________