13.06.2015, 12:02
I'm having a small problem with my cmd.
If this command is being performed by anyone, it will be shown like this.
It will continue to show all bugs. So, well, my question is: is there any way to split the bugs into more pages? Actually, I think there is, but I can't figure this out for myself.
Here's an example (my idea).
PHP код:
CMD:bugs(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COL_LIGHTRED, "You can't do that.");
new File:handle = fopen("Bugs.txt", io_read);
new string[256];
if(fexist("Bugs.txt"))
{
while(fread(handle, string))
{
format(string,sizeof(string),"%s\n\r", string);
SendClientMessage(playerid, -1, string);
}
}
else
{
SCM(playerid, COLOR_YELLOW, "There are no bugs.");
}
fclose(handle);
return 1;
}
PHP код:
BUG 1
BUG 2
BUG 3
BUG 4
BUG 5
BUG 6
...
Here's an example (my idea).
PHP код:
BUG 1
BUG 2
BUG 3
BUG 4
/checkbugs 2 for more.