SAMPGDK problem
#1

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 !
Reply
#2

FIXED, finally I used amalgamation version
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)