What's new

Question Fix text please

N

Nyzer

Newbie
Messages
1
Reaction score
0
Points
20
Sin$
0
Hi,

I have a bug with the text. When I go in 3 - 4 pages, it kick me from the game and it puts me an error message: "G_FindConfigstringIndex: overflow [535, max is 511]: 'Set all Perks'.

Here is my code :

#define G_LocalizeStringIndex2(Text) ((int(*)(const char*))&ParseAddr(0x34348 ))(Text)

short hudElem_cacheText(const char* Text)
{
int G_LocalizedStringIndexOff = 0x34348;
WriteByte(G_LocalizedStringIndexOff + 0x48, 0x41);
short StringT = (short)G_LocalizeStringIndex2(Text);
WriteByte(G_LocalizedStringIndexOff + 0x48, 0x40);
*(byte*) ((int)G_LocalizedStringIndexOff + 0x40) = 0x41;
return StringT;
}

void StoreTextElem(int elemIndex, int client, const char* Text, short font, double fontScale, float x, float y, int alignOrg,int alignScreen, float sort, int r, int g, int b, int a, int glowr, int glowg, int glowb, int glowa)
{
int elem = 0xD87C88 + (elemIndex * 0xB8 );
WriteByte(elem, 0xB8 );
char elem1[] = { 0x00, 0x00, 0x00, 0x01 };
WriteBytes(elem, elem1, 4);
*(int*)(elem + 0xA8 ) = client;
*(short*)(elem + 0x42) = hudElem_cacheText(Text);
*(int*)(elem + 0x00) = 0x1;
*(int*)(elem + 0x28 ) = alignOrg;
*(int*)(elem + 0x2C) = alignScreen;
*(int*)(elem + 0x24) = font;
*(float*)(elem + 0x14) = fontScale;
*(float*)(elem + 0x04) = x;
*(float*)(elem + 0x08 ) = y;
*(char*)(elem + 0x30) = r;
*(char*)(elem + 0x30 + 1) = g;
*(char*)(elem + 0x30 + 2) = b;
*(char*)(elem + 0x30 + 3) = a;
*(char*)(elem + 0x8C) = glowr;
*(char*)(elem + 0x8C + 1) = glowg;
*(char*)(elem + 0x8C + 2) = glowb;
*(char*)(elem + 0x8C + 3) = glowa;
*(float*)(elem + 0x88 ) = sort;
}
 
Top Bottom
Login
Register