как из подобного сделать натив нормальный? для запроса get_user_stats и get_stats
C++:
get_exp_for_stats(id, st[8], bh[12])
{
st[0] = st[0] - st[2] - bh[HIT_RIGHTLEG +1]
g_PlayerData[id][exp] = (st[0] * get_pcvar_num(g_Cvar[1])) + (st[2] * get_pcvar_num(g_Cvar[2])) + (bh[HIT_RIGHTLEG +1] * get_pcvar_num(g_Cvar[3]))
for (new i = 0; i < 21; i ++)
{
if (i < 21)
{
if (g_PlayerData[id][exp] >= LEVELS[i] && g_PlayerData[id][exp] < LEVELS[i +1])
g_PlayerData[id][lvl] = i
else if (g_PlayerData[id][exp] >= LEVELS[21])
g_PlayerData[id][lvl] = 21
}
}
return g_PlayerData[id][lvl]
}