Text Draws (Once again) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Text Draws (Once again) (
/showthread.php?tid=71886)
Text Draws (Once again) -
Tannz0rz - 04.04.2009
Well, recently, Donny and JeNkStA have recently shown me how to properly read from a file with SendClientMessage.
I have taken the idea a step further, and am trying to use Text Draws.
Here's the portion of the code I'm working with that I am trying to display with Text Draws:
Код:
if(strcmp("browse", tmp, true, strlen(tmp)) == 0)
{
new Contents[128];
new ForumRead[128];
new File: rFile = fopen("forum.log", io_read);
fread(rFile, Contents, sizeof(Contents));
{
while (fread(rFile, Contents, sizeof(Contents)))
{
format(ForumRead, sizeof(ForumRead), "%s", Contents);
Textdrawin = TextDrawCreate(99.000000,165.000000 + 8, ForumRead);
TextDrawShowForPlayer(playerid, Textdrawin);
}
}
return 1;
}
The problem that I am experiencing is trying to read from the file while displaying them via paragraphs. To elaborate: the text draws are created in the same position, and I'm trying to get them to display from different positions. Does anyone know how to do that properly?