Tablist Headers Help
#1

foreach(new i: Player)
{
format(string, sizeof(string), "%s%s\t%d\n", string, GetPlayerNameEx(i), pInfo[i][pScore]);
}

I would like to use the tablist headers dialog this way, but if I do something like:

foreach(new i: Player)
{
string = "Name\tScore\n";
format(string, sizeof(string), "%s%s\t%d\n", string, GetPlayerNameEx(i), pInfo[i][pScore]);
}

It will bug out and won't work properly. Can you please tell me how to use it correctly? I want to use this way and please, don't show me the example from the SAMP Filterscript.
Reply
#2

pawn Код:
new dialog[ 512 ];
new tmpLineString[ 92 ];

format(dialog, sizeof dialog, "Name\tScore\n"); //Set the header once

foreach(new i: Player)
{
    format(tmpLineString, sizeof tmpLineString, "%s%s\t%d\n", GetPlayerNameEx(i), pInfo[i][pScore]);
    strins(dialog, tmpLineString, strlen(dialog)); //Update body as many times needed without touching the header
}
Reply
#3

Am I supposed to show the tmpLineString in the dialog?
Reply
#4

Quote:
Originally Posted by dionisak0s
Посмотреть сообщение
Am I supposed to show the tmpLineString in the dialog?
No. Show 'dialog'.
Reply
#5

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
No. Show 'dialog'.
Thanks, I will check it out.
Reply
#6

I still need some help, the solution above didn't work at all.
Reply
#7

Quote:
Originally Posted by dionisak0s
Посмотреть сообщение
I still need some help, the solution above didn't work at all.
Impossible. I'm always using this method.
Show me your code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)