[C++]: Get the name of the AMX.
#1

Код:
PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx) {
	if(SERVER::AddAMX(/* GetAMXName(amx), */ amx) == false) {
		return AMX_ERR_GENERAL;
	}
	return amx_Register(amx, Plugin_Natives, -1);
}

PLUGIN_EXPORT int PLUGIN_CALL AmxUnload(AMX *amx) {
	if(SERVER::RemoveAMX(amx) == false) {
		return AMX_ERR_GENERAL;
	}
	return AMX_ERR_NONE;
}
Is there a way to get the name of the AMX that is being loaded?
Reply
#2

I don't think you can get the name of the AMX loaded using the plugin functions but I can tell you that there is another way of doing it. Read the filterscript and gamemode sections in server.cfg as the name of the gamemode has to match with the amx file, then store it in a container.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)