Witam,
tak jak w temacie. Co robi param_convert()
W źródełkach znalazłem takie cudeńka:
Spoiler
/This is basically right from dJeyL's lib_convert function //This awesome hack modifies the stack frame to have an address offset // that will align to the other plugin's memory. //I've no idea how he thought of this, but it's great. No idea how well it works. static cell AMX_NATIVE_CALL param_convert(AMX *amx, cell *params) { if (!g_pCurNative || (g_pCurNative->amx != amx)) { LogError(amx, AMX_ERR_NATIVE, "Not currently in a dynamic native"); return 0; } if (g_pCurNative->style != 1) { LogError(amx, AMX_ERR_NATIVE, "Wrong style of dynamic native"); return 0; } cell p = params[1]; AMX *caller = g_pCaller; unsigned char *data =amx->base+(int)((AMX_HEADER *)amx->base)->dat; unsigned char *realdata = caller->base+(int)((AMX_HEADER *)caller->base)->dat; * (cell *)(data+(int)amx->frm+(p+2)*sizeof(cell)) -= (cell)data-(cell)realdata; return 1; }