Tablist Headers Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tablist Headers Help (
/showthread.php?tid=589888)
Tablist Headers Help -
dionisak0s - 23.09.2015
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.
Re: Tablist Headers Help -
[XST]O_x - 23.09.2015
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
}
Re: Tablist Headers Help -
dionisak0s - 24.09.2015
Am I supposed to show the tmpLineString in the dialog?
Re: Tablist Headers Help -
[XST]O_x - 24.09.2015
Quote:
Originally Posted by dionisak0s
Am I supposed to show the tmpLineString in the dialog?
|
No. Show 'dialog'.
Re: Tablist Headers Help -
dionisak0s - 25.09.2015
Quote:
Originally Posted by [XST]O_x
No. Show 'dialog'.
|
Thanks, I will check it out.
Re: Tablist Headers Help -
dionisak0s - 10.10.2015
I still need some help, the solution above didn't work at all.
Re: Tablist Headers Help -
[XST]O_x - 10.10.2015
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.