Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------
- //
- // SA:MP Multiplayer Modification For GTA:SA
- // Copyright 2004-2007 SA:MP Team
- //
- //----------------------------------------------------------
- #include <iostream>
- #include <direct.h>
- #include "../SDK/amx/amx.h"
- #include "../SDK/plugincommon.h"
- typedef void (*logprintf_t)(char* format, ...);
- logprintf_t logprintf;
- void **ppPluginData;
- extern void *pAMXFunctions;
- PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports()
- {
- return SUPPORTS_VERSION | SUPPORTS_AMX_NATIVES;
- }
- PLUGIN_EXPORT bool PLUGIN_CALL Load( void **ppData )
- {
- pAMXFunctions = ppData[PLUGIN_DATA_AMX_EXPORTS];
- logprintf = (logprintf_t)ppData[PLUGIN_DATA_LOGPRINTF];
- logprintf( "echo - By DraKiNs" );
- return true;
- }
- PLUGIN_EXPORT void PLUGIN_CALL Unload( )
- {
- logprintf( "echo - By DraKiNs" );
- }
- static cell AMX_NATIVE_CALL nativeEcho(AMX *amx, cell *params)
- {
- if(params[0] / sizeof cell == 1)
- {
- logprintf("LennonGay Error: Invalid parameter count!");
- return false;
- }
- char * str = "\0";
- amx_StrParam(amx, params[1],str);
- return printf(str);
- }
- AMX_NATIVE_INFO LennonGayNatives[ ] =
- {
- { "echo", nativeEcho},
- { 0, 0 }
- };
- PLUGIN_EXPORT int PLUGIN_CALL AmxLoad( AMX *amx )
- {
- return amx_Register( amx, LennonGayNatives, -1 );
- }
- PLUGIN_EXPORT int PLUGIN_CALL AmxUnload( AMX *amx )
- {
- return AMX_ERR_NONE;
- }
- //By DraKiNs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement