SA-MP Forums Archive
SAMPGDK problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SAMPGDK problem (/showthread.php?tid=638897)



SAMPGDK problem - TheArrow - 07.08.2017

Hi

I do a plugin using sampgdk but when I start my server the plugin does not load.

I don't no why because when I used basic plugin sdk, it works !

This is my code and definition file :

Код:
#include <stdio.h>
#include <string.h>
#include <sampgdk\core.h>
#include <sampgdk\sdk.h>


#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "Your Name"

extern void *pAMXFunctions;
/**********************************************************************************************************************************/
PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports()
{
	return sampgdk::Supports() | SUPPORTS_VERSION | SUPPORTS_AMX_NATIVES | SUPPORTS_PROCESS_TICK;
}

PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppData)
{
	pAMXFunctions = ppData[PLUGIN_DATA_AMX_EXPORTS];
	sampgdk::logprintf("\n\n* [Your Plugin Name] %s by %s Loaded", PLUGIN_VERSION, PLUGIN_AUTHOR);
	return sampgdk::Load(ppData);
}
PLUGIN_EXPORT void PLUGIN_CALL Unload()
{
	sampgdk::logprintf("\n\n* [Your Plugin Name] %s by %s Unloaded", PLUGIN_VERSION, PLUGIN_AUTHOR);
	sampgdk::Unload();
}
/**********************************************************************************************************************************/
PLUGIN_EXPORT void PLUGIN_CALL ProcessTick()
{
	sampgdk::ProcessTick();
}
/**********************************************************************************************************************************/
AMX_NATIVE_INFO PluginNatives[] =
{
	{ 0, 0 }
};
PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx)
{
	return amx_Register(amx, PluginNatives, -1);
}
PLUGIN_EXPORT int PLUGIN_CALL AmxUnload(AMX *amx)
{
	return AMX_ERR_NONE;
}
Код:
EXPORTS
	Supports
	Load
	Unload
	AmxLoad
	AmxUnload
	ProcessTick
Thanks in advance !


Re: SAMPGDK problem - TheArrow - 07.08.2017

FIXED, finally I used amalgamation version