HelpSetting Clantag and Title

Posts 1–6 of 6 · Page 1 of 1
Setting Clantag and Title
Hi everybody,

got a little problem at the moment. Tried to write my first Clantag + Title changer, but i get stuck. Whenever i set my new Title and it is shorter than the old one, the letters from the old one behind the new one are still there. One Example for this:

1. Set Title "test" ---> Title: test
2. Set Title "mpghrules" ---> Title: mpghrules
3. Set Title "xy" ----> Title: xyghrules

The same with the clantag. Anybody can explain me how to fix this? I think i have to clear the String before i re-fill it, but how?

Thanks in advance
x2Sorcer
Quote Originally Posted by x2Sorcer View Post
Hi everybody,

got a little problem at the moment. Tried to write my first Clantag + Title changer, but i get stuck. Whenever i set my new Title and it is shorter than the old one, the letters from the old one behind the new one are still there. One Example for this:

1. Set Title "test" ---> Title: test
2. Set Title "mpghrules" ---> Title: mpghrules
3. Set Title "xy" ----> Title: xyghrules

The same with the clantag. Anybody can explain me how to fix this? I think i have to clear the String before i re-fill it, but how?

Thanks in advance
x2Sorcer
Ensure you clear the old values before you write the new ones.
(Or just set a max size to write)
Yeah, just tried that, but how do i clear them exactly? Tried to set them to "", but that didnt work.
You can write spaces or a null byte (zero) at the end of your string if it is shorter than the max.
Ah okay, thank you very much
But spaces only work on the Players name, because spaces at the end of the clantag or title look weird

So I have to use the zero byte thingy I think...
Define a null array (7 Bytes Max) And write it to the address then add the clan tag.
Code:
byte[] Null7 = new byte[7];

WriteBytes(Address, Null7);

WriteString(Address, "MPGH");
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us