It is to my understanding that is suppose to convert pointers to strings ala HL eng (STRING) which this isnt.
glb.cpp - line 155 add this:
Code:
else if (paramnum == 3)
{
cell size = *(MF_GetAmxAddr(amx, params[4]));
if (Valtype == Ret_PChar)
{
cell *str = MF_GetAmxAddr(amx, params[2]);
return MF_SetAmxString(amx, params[3], STRING((int)*str), size);
}
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid return type");
}
How it works (example):
Code:
new pointer = pev(id, pev_viewmodel)
global_get(glb_pStringBase, pointer, temp, 127)
As you see it makes this redundant:
pev_string2_begin, /* anything after here are string corrections */
pev_weaponmodel2,
pev_viewmodel2,
Another suggestion changing this:
pev.cpp - line 277
Code:
if (ValType == Ret_String)
{
const char *str = STRING(rets.s);
if (!str)
str = "";
int num = MF_SetAmxString(amx, params[3], str, size);
return num;
To:
Code:
if (ValType == Ret_String)
{
const char *str = STRING(rets.s);
if (!str)
str = "";
MF_SetAmxString(amx, params[3], str, size);
return (int)rets.s;
Reason being, why was it originally returning the string length? We have a native to check that! Least with this way it returns the pointer and we can check the pointer at any given time with the other code above.
Regards,
Orangutanz