Plugin
Code:
#include <sourcemod>
#include <test>
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) {
RegPluginLibrary("test");
CreateNative("Test_PassStruct", Native_PassStruct);
}
public any Native_PassStruct(Handle plugin, int numParams) {
TestStruct test;
test.x = 1;
test.y = 2;
SetNativeArray(1, test, sizeof(TestStruct));
return 1;
}
Include
Code:
#if defined _test_included_
#endinput
#endif
#define _test_included_
enum struct TestStruct {
int x;
int y;
}
native void Test_PassStruct(any teststruct[sizeof(TestStruct)]);
public SharedPlugin __pl_test = {
name = "test",
file = "test.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};
__________________