@Napoleon_be - the plugin is not working in the current state you provided with the Simon access.
Code:
public openGlowMenu(id)
{
if(!has_agm_access(id))
{
ColorChat(id, GREEN, "%L", id, "MSG_NO_ACCESS", g_szSettings[PREFIX_STR]);
return PLUGIN_HANDLED;
}
if(g_szSettings[SIMON_ONLY] && ( g_bSimonNativeExists && is_user_simon(id) ))
{
displayColorMenu(id);
}
return PLUGIN_HANDLED;
}
This code will never run on a server with no is_user_simon() native thus no menu will open. Also you forgot to mention that SIMON_ONLY needs to be added in the .ini file.
The function should look like this:
Code:
public openGlowMenu(id)
{
if(g_bSimonNativeExists)
{
if(g_szSettings[SIMON_ONLY] && !is_user_simon(id))
{
ColorChat(id, GREEN, "%L", id, "MSG_NO_ACCESS", g_szSettings[PREFIX_STR]);
return PLUGIN_HANDLED;
}
}
else if(!has_agm_access(id))
{
ColorChat(id, GREEN, "%L", id, "MSG_NO_ACCESS", g_szSettings[PREFIX_STR]);
return PLUGIN_HANDLED;
}
displayColorMenu(id);
return PLUGIN_HANDLED;
}
The same goes for other functions with the same checks. You should move all checks to has_agm_access() instead of copy/pasting them everywhere.
Also it looks like I told you wrongly how to detect if the native is loaded.
Code:
public nativeFilter(const szNative[], id, iTrap)
{
if(!iTrap)
{
if(equal(szNative, g_szSimonNative))
{
g_bSimonNativeExists = true;
return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}
This function will only be called when the native is NOT loaded, so you need to do it the other way around.
Set g_bSimonNativeExists to true by default, and to false inside nativeFilter().
__________________