amx_spectate is the command, not the public function.
Use this :
PHP Code:
CallSpectateFunction(id)
{
static plugin = -1, func = -1, pluginType = 0;
if( plugin == -1 )
{
plugin = is_plugin_loaded("Invisible Spectator");
if( plugin > 0 )
{
func = get_func_id("make_invis", plugin); // old version
if( func == -1 )
{
func = get_func_id("ClCmd_Spectate", plugin); // orpheu version
if( func != -1 )
{
// ops, something went wrong !!
pluginType = 2; // orpheu
}
}
else
{
pluginType = 1;
}
}
}
if( func != -1 )
{
if( callfunc_begin_i(func, plugin) )
{
callfunc_push_int(id);
if( pluginType == 2 )
{
callfunc_push_int(ADMIN_BAN);
}
callfunc_end();
}
}
}
__________________