CMD:Test(playerid,params[])
{
new File:Text, i, string[128];
new tmp[20], tmp2[20], idx; tmp = strtok(params,idx), tmp2 = strtok(params,idx);
if(!strlen(tmp2)) return SendClientMessage(playerid, RED, "Benutze: /test [start] [ende]");
new start = strval(tmp);
new ende = strval(tmp2);
if(fexist("Text.txt"))
{
Text = fopen("Text.txt", io_read);
while(fread(Text, string))
{
i++;
if(i>=start && i<=ende) format(string, sizeof(string), "Gesuchter Text in Zeile %d: %s", i, string), SendClientMessage(playerid, RED, string);
}
}
return 1;
}
Ich schätze du meinst es so.
Dazu brauchst du noch strtok: http://wiki.sa-mp.com/wiki/Strtok